2019-02-07 22:54:06 +01:00
|
|
|
/******************************************************************************
|
|
|
|
* 3n[xxxxxx] LC (n) [xxxxxx]
|
|
|
|
*
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2019-02-08 11:06:19 +01:00
|
|
|
`include "decstates.v"
|
|
|
|
|
|
|
|
`DEC_LC_LEN: begin
|
|
|
|
t_cnt <= nibble;
|
|
|
|
t_ctr <= 0;
|
|
|
|
decstate <= `DEC_LC;
|
|
|
|
end
|
|
|
|
`DEC_LC: begin
|
|
|
|
C[((t_ctr+P)%16)*4+:4] <= nibble;
|
|
|
|
if (t_ctr == t_cnt) begin
|
|
|
|
decstate <= `DEC_START;
|
|
|
|
`ifdef SIM
|
2019-02-08 11:15:16 +01:00
|
|
|
$write("%5h LC (%h)\t%1h", inst_start_PC, t_cnt, nibble);
|
2019-02-08 11:06:19 +01:00
|
|
|
for(t_ctr = 0; t_ctr != t_cnt; t_ctr ++)
|
|
|
|
$write("%1h", C[(((t_cnt - t_ctr - 4'h1)+P)%16)*4+:4]);
|
|
|
|
$write("\n");
|
|
|
|
`endif
|
|
|
|
end else begin
|
|
|
|
t_ctr <= (t_ctr + 1)&4'hf;
|
|
|
|
end
|
|
|
|
end
|