diff --git a/system/biu.v b/system/biu.v index 1ff2d30..c2ff08a 100644 --- a/system/biu.v +++ b/system/biu.v @@ -110,6 +110,11 @@ always @(posedge clock) begin func <= 1; if (biu_state==`BIU_READ) biu_state <= `BIU_NEXT_ACTION; + end else if(valid_instruction_ack) begin + /* verilator lint_off BLKSEQ */ + FIFO_start <= FIFO_start + {{`L1_CACHE_SIZE-3{1'b0}},Isize}; + /* verilator lint_on BLKSEQ */ + INSTRUCTION_LOCATION <= INSTRUCTION_LOCATION + {13'd0,Isize}; end else begin case(biu_state) `BIU_HALT: begin @@ -377,11 +382,4 @@ InstrSize fifoInstrSize2( ); `endif -always @( valid_instruction_ack ) begin - /* verilator lint_off BLKSEQ */ - FIFO_start <= FIFO_start + {{`L1_CACHE_SIZE-3{1'b0}},Isize}; - /* verilator lint_on BLKSEQ */ - INSTRUCTION_LOCATION <= INSTRUCTION_LOCATION + {13'd0,Isize}; -end - endmodule diff --git a/system/decoder.v b/system/decoder.v index 8f6091d..d21329b 100644 --- a/system/decoder.v +++ b/system/decoder.v @@ -122,9 +122,10 @@ always @(posedge clock)begin VALID_INSTRUCTION_ACK <= 0; wait_<=0; end else begin - if(wait_!=0) + if(wait_!=0) begin wait_<=0; - else if(next_exec==1'b1)begin + VALID_INSTRUCTION_ACK<=0; + end else if(next_exec==1'b1)begin if ( ( VALID_INSTRUCTION_lc == 1 || SIMPLE_MICRO == 1 ) /*&& DEPENDS_ON_PREVIOUS == 0 && ucode_seq_addr_entry==`UCODE_NO_INSTRUCTION*/) begin //`define LATCH(VAR) VAR_LATCHED <= VAR; //TODO would this work? IN_MOD_LATCHED <= IN_MOD; @@ -164,7 +165,7 @@ always @(posedge clock)begin `endif owe_set_init<=0; ProgCount <= INSTRUCTION_LOCATION+{12'b0,instr_end}; - VALID_INSTRUCTION_ACK <= !VALID_INSTRUCTION_ACK; + VALID_INSTRUCTION_ACK <= 1; end if(set_params)begin set_initial_values <= !set_initial_values;