?? 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 + -