
[Verilog] 베릴로그 기본
2022. 12. 9. 15:31
학사_공부 정리/디지털논리회로
Sequnential Logic Systemalwasy @(posedge clk or negedge rst)beginif(rst == 0) beginendelse beginendendalways구문-D F/Fmodule flip-flip(q,din,clk,rst);input din, clk, rest;output q;reg q;alwasy @(posedge clk or negedge rst)beginif(rst==0)qCombinationalSequentialmodule combinational(a,b,sel,out); input a,b; input sel; output out; reg out; always @ ( a or b or sel) begin if (sel ) out=a; else out=b;..

[ Verilog ] 베릴로그 기본
2022. 12. 5. 01:38
학사_공부 정리/디지털논리회로
수 표현4'blll1 // 4 비트 2 진수12'habc //12비트 16진수16'd255 //16 비트 10진수-6'd3 // 3이 2의 보수로써 음수 4-bit binary number: 111112-bit hexadecimal number: habc16-bit decimal number: 255 음수는 앞에 -가 붙는다. // two's complement 사용. #of Bits : binary로 표현 시 몇 bitStored : binary로 표현 했을 때Invalid : 5는 binary가 될 수 없다 . . .Unsized : 몇 bit인지 표현되어있지 않는다. 논리값논리값 수준하드웨어 회로에서의 상태0논리적 0, 거짓상태1논리적 1, 참 상태x알 수 없는 논리 값z하이 임피던스, 플로팅 상태..