Line 40... |
Line 40... |
|
|
`include "timescale.v"
|
`include "timescale.v"
|
`include "defines.v"
|
`include "defines.v"
|
|
|
|
|
module tcLoad (tcLoadEn, tcAddr, dnIn, ttIn, cuIn, cdIn, tcLoadOut);
|
module tcLoad (tcAddr, dnIn, ttIn, cuIn, cdIn, tcLoadOut);
|
|
|
input tcLoadEn;
|
|
input [`tcAddrLen-1:0] tcAddr;
|
input [`tcAddrLen-1:0] tcAddr;
|
input [`tcNumbers-1:0] dnIn, ttIn, cuIn, cdIn;
|
input [`tcNumbers-1:0] dnIn, ttIn, cuIn, cdIn;
|
|
|
output [7:0] tcLoadOut;
|
output [7:0] tcLoadOut;
|
|
|
reg [`tcNumbers-1:0] dnInReg, ttInReg, cuInReg, cdInReg;
|
|
|
|
wire dnSel, ttSel, cuSel, cdSel;
|
wire dnSel, ttSel, cuSel, cdSel;
|
|
|
always @ *
|
|
begin
|
|
dnInReg = dnIn;
|
|
ttInReg = ttIn;
|
|
cuInReg = cuIn;
|
|
cdInReg = cdIn;
|
|
end
|
|
|
|
assign dnSel = dnInReg[tcAddr];
|
|
assign ttSel = ttInReg[tcAddr];
|
|
assign cuSel = cuInReg[tcAddr];
|
|
assign cdSel = cdInReg[tcAddr];
|
|
|
|
assign tcLoadOut = {4'b0, dnSel, ttSel, cuSel, cdSel};
|
assign dnSel = dnIn[tcAddr];
|
|
assign ttSel = ttIn[tcAddr];
|
|
assign cuSel = cuIn[tcAddr];
|
|
assign cdSel = cdIn[tcAddr];
|
|
|
|
assign tcLoadOut = {4'b0, cdSel, cuSel, ttSel, dnSel};
|
|
|
|
|
endmodule
|
endmodule
|
|
|
No newline at end of file
|
No newline at end of file
|