HDLBits - AND gate / NOR gate / XNOR gate
·
HDLBits/Verilog
기본적인 문제라서 그냥 한번에 하기로 했다지난번에 한 NOT 까지 합치면NOT / AND / NOR / XNOR 순으로 문제가 나와있다.Bitwise 연산자와 Logical 연산자는 비슷하지만 다름!Bitwise(Bit 연산)NOT: b = ~aAND: c = a & bOR: c = a | bXOR: c = a ^ bLogical(True, False)NOT: b = !aAND: c = a && bOR: c = a || bXOR: 없음이번엔 a 와 b의 입력을 AND gate로 묶어서 out으로 출력하는 문제module top_module( input a, input b, output out ); assign out = a & b;endmodulea, b 입력을 NOR gate..
HDLBits - Notgate
·
HDLBits/Verilog
단순히 NOT Gate를 사용하여 inverse 시키는 문제module top_module( input in, output out); assign out = ~in;endmodule
HDLBits - Wire4
·
HDLBits/Verilog
해당 그림처럼 연결하는 문제그냥 하나하나 연결 해주면 끝My Answermodule top_module( input a,b,c, output w,x,y,z); assign w = a; assign x = b; assign y = b; assign z = c;endmodule코드 블럭에 Verilog가 기본 지원이 아니다보니 너무 복잡하다 ㅠㅠ
HDLBits - Simple wire
·
HDLBits/Verilog
Wire의 사용법에 대한 문제input in을 output out에 연결하라는 간단한 문제이다. My Answermodule top_module(input in, output out); assign out = in;endmodule
HDLBits - Zero
·
HDLBits/Verilog
앞선 문제보다 쉽?다 그냥 0은 입력안해도 0이다~ 알려주는 문제Module Declarationmodule top_module( output zero );My Answermodule top_module( output zero );endmodule
HDLBits - Getting Started
·
HDLBits/Verilog
시작하면 가장 처음에 나오는 문제 그냥 1이 출력되는 모듈을 만드시오Module Declarationmodule top_module( output one );My Answermodule top_module( output one ); assign one = 1'b1;endmodule