📄 bidirectionalcell.v
字号:
/*********************************************************************************** ** BiDirectional Cell: ** ** FromCore: Value that comes from on-chip logic and goes to pin ** ToCore: Value that is read-in from the pin and goes to core ** FromPreviousBSCell: Value from previous boundary scan cell ** ToNextBSCell: Value for next boundary scan cell ** CaptureDR, ShiftDR, UpdateDR: TAP states ** extest: Instruction Register Command ** TCK: Test Clock ** BiDirPin: Bidirectional pin connected to this BS cell ** FromOutputEnable: This pin comes from core or ControlCell ** ** Signal that is connected to BiDirPin comes from core or BS chain. Tristate ** control is generated in core or BS chain (ControlCell). ** ***********************************************************************************/module BiDirectionalCell( FromCore, ToCore, FromPreviousBSCell, CaptureDR, ShiftDR, UpdateDR, extest, TCK, ToNextBSCell, FromOutputEnable, BiDirPin);input FromCore;input FromPreviousBSCell;input CaptureDR;input ShiftDR;input UpdateDR;input extest;input TCK;input FromOutputEnable;reg Latch;output ToNextBSCell;reg ToNextBSCell;output BiDirPin;output ToCore;reg ShiftedControl;wire SelectedInput = CaptureDR? BiDirPin : FromPreviousBSCell;always @ (posedge TCK)begin if(CaptureDR | ShiftDR) Latch<=SelectedInput;endalways @ (negedge TCK)begin ToNextBSCell<=Latch;endalways @ (negedge TCK)begin if(UpdateDR) ShiftedControl<=ToNextBSCell;endwire MuxedSignal = extest? ShiftedControl : FromCore;assign BiDirPin = FromOutputEnable? MuxedSignal : 1'bz;//BUF Buffer (.I(BiDirPin), .O(ToCore));assign ToCore = BiDirPin;endmodule // TristateCell
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -