mirror of
https://github.com/openhwgroup/cvw
synced 2025-02-11 06:05:49 +00:00
Changed always @(posedge clk) to always_ff @(posedge clk) where it was omitted in several places
This commit is contained in:
parent
b386331cc8
commit
e0eb91f795
@ -52,7 +52,7 @@ module rom1p1r #(parameter ADDR_WIDTH = 8, DATA_WIDTH = 32, PRELOAD_ENABLED = 0)
|
||||
end
|
||||
end
|
||||
|
||||
always @ (posedge clk) begin
|
||||
always_ff @ (posedge clk) begin
|
||||
if(ce) dout <= ROM[addr];
|
||||
end
|
||||
|
||||
|
@ -74,11 +74,11 @@ module csri import cvw::*; #(parameter cvw_t P) (
|
||||
assign SIP_WRITE_MASK = 12'h000;
|
||||
assign MIE_WRITE_MASK = 12'h888;
|
||||
end
|
||||
always @(posedge clk)
|
||||
always_ff @(posedge clk)
|
||||
if (reset) MIP_REGW_writeable <= 12'b0;
|
||||
else if (WriteMIPM) MIP_REGW_writeable <= (CSRWriteValM[11:0] & MIP_WRITE_MASK);
|
||||
else if (WriteSIPM) MIP_REGW_writeable <= (CSRWriteValM[11:0] & SIP_WRITE_MASK) | (MIP_REGW_writeable & ~SIP_WRITE_MASK);
|
||||
always @(posedge clk)
|
||||
always_ff @(posedge clk)
|
||||
if (reset) MIE_REGW <= 12'b0;
|
||||
else if (WriteMIEM) MIE_REGW <= (CSRWriteValM[11:0] & MIE_WRITE_MASK); // MIE controls M and S fields
|
||||
else if (WriteSIEM) MIE_REGW <= (CSRWriteValM[11:0] & 12'h222 & MIDELEG_REGW) | (MIE_REGW & 12'h888); // only S fields
|
||||
|
@ -63,7 +63,7 @@ module clint_apb import cvw::*; #(parameter cvw_t P) (
|
||||
|
||||
// register access
|
||||
if (P.XLEN==64) begin:clint // 64-bit
|
||||
always @(posedge PCLK) begin
|
||||
always_ff @(posedge PCLK) begin
|
||||
case(entry)
|
||||
16'h0000: PRDATA <= {63'b0, MSIP};
|
||||
16'h4000: PRDATA <= MTIMECMP;
|
||||
@ -97,7 +97,7 @@ module clint_apb import cvw::*; #(parameter cvw_t P) (
|
||||
MTIME[j*8 +: 8] <= PWDATA[j*8 +: 8];
|
||||
end else MTIME <= MTIME + 1;
|
||||
end else begin:clint // 32-bit
|
||||
always @(posedge PCLK) begin
|
||||
always_ff @(posedge PCLK) begin
|
||||
case(entry)
|
||||
16'h0000: PRDATA <= {31'b0, MSIP};
|
||||
16'h4000: PRDATA <= MTIMECMP[31:0];
|
||||
|
@ -104,7 +104,7 @@ module plic_apb import cvw::*; #(parameter cvw_t P) (
|
||||
// ==================
|
||||
localparam PLIC_NUM_SRC_MIN_32 = P.PLIC_NUM_SRC < 32 ? P.PLIC_NUM_SRC : 31;
|
||||
|
||||
always @(posedge PCLK) begin
|
||||
always_ff @(posedge PCLK) begin
|
||||
// resetting
|
||||
if (~PRESETn) begin
|
||||
intPriority <= #1 0;
|
||||
|
@ -520,7 +520,7 @@ module uartPC16550D #(parameter UART_PRESCALE) (
|
||||
intrpending = 0;
|
||||
end
|
||||
end
|
||||
always @(posedge PCLK) INTR <= #1 intrpending; // prevent glitches on interrupt pin
|
||||
always_ff @(posedge PCLK) INTR <= #1 intrpending; // prevent glitches on interrupt pin
|
||||
|
||||
// Side effect of reading LSR is lowering overrun, parity, framing, break intr's
|
||||
assign setSquashRXerrIP = ~MEMRb & (A==3'b101);
|
||||
|
Loading…
Reference in New Issue
Block a user