검색결과 리스트
글
verilog inout
Learning stuff
2013. 1. 30. 23:35
inout are actually "wire" so we can't use any procedural assignments. we need to use continuous
assignments.
inout a,b;
input wire enable;
wire a_out, b_out;
wire a_in, b_in;
//output assignment of inout port
assign a = (enable) ? a_out : 1'bz;
assign b = (enable) ? b_out : 1'bz;
//input assignment of inout port
assign a_in = (enable) ? a : 1'bz;
assign b_in = (enable) ? b : 1'bz;
'Learning stuff' 카테고리의 다른 글
H.264/AVC intro (2) | 2013.02.14 |
---|---|
Verilog Vector and Arrays (0) | 2013.02.13 |
SRAM timing diagram (0) | 2013.01.30 |
SIMD (0) | 2013.01.29 |
verilog $setup, $hold, $width (0) | 2013.01.29 |