mirror of
https://github.com/openhwgroup/cvw
synced 2025-02-11 06:05:49 +00:00
Merge pull request #337 from harshinisrinath1001/main
Fixed the spacing of the uncore and wally modules
This commit is contained in:
commit
8dbbf9201a
@ -151,4 +151,3 @@ module gpio_apb import cvw::*; #(parameter cvw_t P) (
|
|||||||
|
|
||||||
assign GPIOIntr = |{(rise_ip & rise_ie),(fall_ip & fall_ie),(high_ip & high_ie),(low_ip & low_ie)};
|
assign GPIOIntr = |{(rise_ip & rise_ie),(fall_ip & fall_ie),(high_ip & high_ie),(low_ip & low_ie)};
|
||||||
endmodule
|
endmodule
|
||||||
|
|
||||||
|
@ -97,6 +97,7 @@ module plic_apb import cvw::*; #(parameter cvw_t P) (
|
|||||||
// ==================
|
// ==================
|
||||||
// Register Interface
|
// Register Interface
|
||||||
// ==================
|
// ==================
|
||||||
|
|
||||||
always @(posedge PCLK) begin
|
always @(posedge PCLK) begin
|
||||||
// resetting
|
// resetting
|
||||||
if (~PRESETn) begin
|
if (~PRESETn) begin
|
||||||
@ -245,4 +246,3 @@ module plic_apb import cvw::*; #(parameter cvw_t P) (
|
|||||||
assign MExtInt = |(threshMask[0] & priorities_with_irqs[0]);
|
assign MExtInt = |(threshMask[0] & priorities_with_irqs[0]);
|
||||||
assign SExtInt = |(threshMask[1] & priorities_with_irqs[1]);
|
assign SExtInt = |(threshMask[1] & priorities_with_irqs[1]);
|
||||||
endmodule
|
endmodule
|
||||||
|
|
||||||
|
@ -74,7 +74,6 @@ module ram_ahb import cvw::*; #(parameter cvw_t P,
|
|||||||
ram1p1rwbe #(.DEPTH(RANGE/8), .WIDTH(P.XLEN)) memory(.clk(HCLK), .ce(1'b1),
|
ram1p1rwbe #(.DEPTH(RANGE/8), .WIDTH(P.XLEN)) memory(.clk(HCLK), .ce(1'b1),
|
||||||
.addr(RamAddr[ADDR_WIDTH+OFFSET-1:OFFSET]), .we(memwriteD), .din(HWDATA), .bwe(HWSTRB), .dout(HREADRam));
|
.addr(RamAddr[ADDR_WIDTH+OFFSET-1:OFFSET]), .we(memwriteD), .din(HWDATA), .bwe(HWSTRB), .dout(HREADRam));
|
||||||
|
|
||||||
|
|
||||||
// use this to add arbitrary latency to ram. Helps test AHB controller correctness
|
// use this to add arbitrary latency to ram. Helps test AHB controller correctness
|
||||||
if(`RAM_LATENCY > 0) begin
|
if(`RAM_LATENCY > 0) begin
|
||||||
logic [7:0] NextCycle, Cycle;
|
logic [7:0] NextCycle, Cycle;
|
||||||
@ -110,4 +109,3 @@ module ram_ahb import cvw::*; #(parameter cvw_t P,
|
|||||||
end
|
end
|
||||||
|
|
||||||
endmodule
|
endmodule
|
||||||
|
|
||||||
|
@ -48,4 +48,3 @@ module rom_ahb import cvw::*; #(parameter cvw_t P,
|
|||||||
rom1p1r #(ADDR_WIDTH, P.XLEN, P.FPGA)
|
rom1p1r #(ADDR_WIDTH, P.XLEN, P.FPGA)
|
||||||
memory(.clk(HCLK), .ce(1'b1), .addr(HADDR[ADDR_WIDTH+OFFSET-1:OFFSET]), .dout(HREADRom));
|
memory(.clk(HCLK), .ce(1'b1), .addr(HADDR[ADDR_WIDTH+OFFSET-1:OFFSET]), .dout(HREADRom));
|
||||||
endmodule
|
endmodule
|
||||||
|
|
||||||
|
@ -122,6 +122,7 @@ module uartPC16550D #(parameter UART_PRESCALE, QEMU) (
|
|||||||
///////////////////////////////////////////
|
///////////////////////////////////////////
|
||||||
// Input synchronization: 2-stage synchronizer
|
// Input synchronization: 2-stage synchronizer
|
||||||
///////////////////////////////////////////
|
///////////////////////////////////////////
|
||||||
|
|
||||||
always_ff @(posedge PCLK) begin
|
always_ff @(posedge PCLK) begin
|
||||||
{SINd, DSRbd, DCDbd, CTSbd, RIbd} <= #1 {SIN, DSRb, DCDb, CTSb, RIb};
|
{SINd, DSRbd, DCDbd, CTSbd, RIbd} <= #1 {SIN, DSRb, DCDb, CTSb, RIb};
|
||||||
{SINsync, DSRbsync, DCDbsync, CTSbsync, RIbsync} <= #1 loop ? {SOUTbit, ~MCR[0], ~MCR[3], ~MCR[1], ~MCR[2]} :
|
{SINsync, DSRbsync, DCDbsync, CTSbsync, RIbsync} <= #1 loop ? {SOUTbit, ~MCR[0], ~MCR[3], ~MCR[1], ~MCR[2]} :
|
||||||
@ -132,6 +133,7 @@ module uartPC16550D #(parameter UART_PRESCALE, QEMU) (
|
|||||||
///////////////////////////////////////////
|
///////////////////////////////////////////
|
||||||
// Register interface (Table 1, note some are read only and some write only)
|
// Register interface (Table 1, note some are read only and some write only)
|
||||||
///////////////////////////////////////////
|
///////////////////////////////////////////
|
||||||
|
|
||||||
always_ff @(posedge PCLK, negedge PRESETn)
|
always_ff @(posedge PCLK, negedge PRESETn)
|
||||||
if (~PRESETn) begin // Table 3 Reset Configuration
|
if (~PRESETn) begin // Table 3 Reset Configuration
|
||||||
IER <= #1 4'b0;
|
IER <= #1 4'b0;
|
||||||
@ -208,6 +210,7 @@ module uartPC16550D #(parameter UART_PRESCALE, QEMU) (
|
|||||||
///////////////////////////////////////////
|
///////////////////////////////////////////
|
||||||
// Ross Thompson: Found a bug. If the baud rate dividers DLM, and DLL are reloaded
|
// Ross Thompson: Found a bug. If the baud rate dividers DLM, and DLL are reloaded
|
||||||
// the baudcount is not reset to {DLM, DLL, UART_PRESCALE}
|
// the baudcount is not reset to {DLM, DLL, UART_PRESCALE}
|
||||||
|
|
||||||
always_ff @(posedge PCLK, negedge PRESETn)
|
always_ff @(posedge PCLK, negedge PRESETn)
|
||||||
if (~PRESETn) begin
|
if (~PRESETn) begin
|
||||||
baudcount <= #1 1;
|
baudcount <= #1 1;
|
||||||
@ -233,6 +236,7 @@ module uartPC16550D #(parameter UART_PRESCALE, QEMU) (
|
|||||||
///////////////////////////////////////////
|
///////////////////////////////////////////
|
||||||
// receive timing and control
|
// receive timing and control
|
||||||
///////////////////////////////////////////
|
///////////////////////////////////////////
|
||||||
|
|
||||||
always_ff @(posedge PCLK, negedge PRESETn)
|
always_ff @(posedge PCLK, negedge PRESETn)
|
||||||
if (~PRESETn) begin
|
if (~PRESETn) begin
|
||||||
rxoversampledcnt <= #1 0;
|
rxoversampledcnt <= #1 0;
|
||||||
@ -267,6 +271,7 @@ module uartPC16550D #(parameter UART_PRESCALE, QEMU) (
|
|||||||
///////////////////////////////////////////
|
///////////////////////////////////////////
|
||||||
// receive shift register, buffer register, FIFO
|
// receive shift register, buffer register, FIFO
|
||||||
///////////////////////////////////////////
|
///////////////////////////////////////////
|
||||||
|
|
||||||
always_ff @(posedge PCLK, negedge PRESETn)
|
always_ff @(posedge PCLK, negedge PRESETn)
|
||||||
if (~PRESETn) rxshiftreg <= #1 10'b0000000001; // initialize so that there is a valid stop bit
|
if (~PRESETn) rxshiftreg <= #1 10'b0000000001; // initialize so that there is a valid stop bit
|
||||||
else if (rxcentered) rxshiftreg <= #1 {rxshiftreg[8:0], SINsync}; // capture bit
|
else if (rxcentered) rxshiftreg <= #1 {rxshiftreg[8:0], SINsync}; // capture bit
|
||||||
@ -368,6 +373,7 @@ module uartPC16550D #(parameter UART_PRESCALE, QEMU) (
|
|||||||
///////////////////////////////////////////
|
///////////////////////////////////////////
|
||||||
// transmit timing and control
|
// transmit timing and control
|
||||||
///////////////////////////////////////////
|
///////////////////////////////////////////
|
||||||
|
|
||||||
always_ff @(posedge PCLK, negedge PRESETn)
|
always_ff @(posedge PCLK, negedge PRESETn)
|
||||||
if (~PRESETn) begin
|
if (~PRESETn) begin
|
||||||
txoversampledcnt <= #1 0;
|
txoversampledcnt <= #1 0;
|
||||||
@ -395,6 +401,7 @@ module uartPC16550D #(parameter UART_PRESCALE, QEMU) (
|
|||||||
///////////////////////////////////////////
|
///////////////////////////////////////////
|
||||||
// transmit holding register, shift register, FIFO
|
// transmit holding register, shift register, FIFO
|
||||||
///////////////////////////////////////////
|
///////////////////////////////////////////
|
||||||
|
|
||||||
always_comb begin // compute value for parity and tx holding register
|
always_comb begin // compute value for parity and tx holding register
|
||||||
nexttxdata = fifoenabled ? txfifo[txfifotail] : TXHR; // pick from FIFO or holding register
|
nexttxdata = fifoenabled ? txfifo[txfifotail] : TXHR; // pick from FIFO or holding register
|
||||||
case (LCR[1:0]) // compute parity from appropriate number of bits
|
case (LCR[1:0]) // compute parity from appropriate number of bits
|
||||||
@ -495,6 +502,7 @@ module uartPC16550D #(parameter UART_PRESCALE, QEMU) (
|
|||||||
///////////////////////////////////////////
|
///////////////////////////////////////////
|
||||||
// interrupts
|
// interrupts
|
||||||
///////////////////////////////////////////
|
///////////////////////////////////////////
|
||||||
|
|
||||||
assign RXerr = |LSR[4:1]; // LS interrupt if any of the flags are true
|
assign RXerr = |LSR[4:1]; // LS interrupt if any of the flags are true
|
||||||
assign RXerrIP = RXerr & ~squashRXerrIP; // intr squashed upon reading LSR
|
assign RXerrIP = RXerr & ~squashRXerrIP; // intr squashed upon reading LSR
|
||||||
assign rxdataavailintr = fifoenabled ? rxfifotriggered : rxdataready;
|
assign rxdataavailintr = fifoenabled ? rxfifotriggered : rxdataready;
|
||||||
|
@ -97,4 +97,3 @@ module uart_apb import cvw::*; #(parameter cvw_t P) (
|
|||||||
);
|
);
|
||||||
|
|
||||||
endmodule
|
endmodule
|
||||||
|
|
||||||
|
@ -189,4 +189,3 @@ module uncore import cvw::*; #(parameter cvw_t P)(
|
|||||||
HSELCLINTD, HSELGPIOD, HSELUARTD, HSELPLICD, HSELSDCD, HSELNoneD});
|
HSELCLINTD, HSELGPIOD, HSELUARTD, HSELPLICD, HSELSDCD, HSELNoneD});
|
||||||
flopenr #(1) hselbridgedelayreg(HCLK, ~HRESETn, HREADY, HSELBRIDGE, HSELBRIDGED);
|
flopenr #(1) hselbridgedelayreg(HCLK, ~HRESETn, HREADY, HSELBRIDGE, HSELBRIDGED);
|
||||||
endmodule
|
endmodule
|
||||||
|
|
||||||
|
@ -148,7 +148,6 @@ typedef struct packed {
|
|||||||
int BPRED_SIZE;
|
int BPRED_SIZE;
|
||||||
int BTB_SIZE;
|
int BTB_SIZE;
|
||||||
|
|
||||||
|
|
||||||
// FPU division architecture
|
// FPU division architecture
|
||||||
int RADIX;
|
int RADIX;
|
||||||
int DIVCOPIES;
|
int DIVCOPIES;
|
||||||
@ -256,7 +255,7 @@ typedef struct packed {
|
|||||||
|
|
||||||
// division constants
|
// division constants
|
||||||
int DIVN ;
|
int DIVN ;
|
||||||
int LOGR;
|
int LOGR ;
|
||||||
int RK ;
|
int RK ;
|
||||||
int LOGRK ;
|
int LOGRK ;
|
||||||
int FPDUR ;
|
int FPDUR ;
|
||||||
|
@ -319,7 +319,7 @@ module wallypipelinedcore import cvw::*; #(parameter cvw_t P) (
|
|||||||
.clk, .reset,
|
.clk, .reset,
|
||||||
.FRM_REGW, // Rounding mode from CSR
|
.FRM_REGW, // Rounding mode from CSR
|
||||||
.InstrD, // instruction from IFU
|
.InstrD, // instruction from IFU
|
||||||
.ReadDataW(ReadDataW[P.FLEN-1:0]),// Read data from memory
|
.ReadDataW(ReadDataW[P.FLEN-1:0]), // Read data from memory
|
||||||
.ForwardedSrcAE, // Integer input being processed (from IEU)
|
.ForwardedSrcAE, // Integer input being processed (from IEU)
|
||||||
.StallE, .StallM, .StallW, // stall signals from HZU
|
.StallE, .StallM, .StallW, // stall signals from HZU
|
||||||
.FlushE, .FlushM, .FlushW, // flush signals from HZU
|
.FlushE, .FlushM, .FlushW, // flush signals from HZU
|
||||||
|
Loading…
Reference in New Issue
Block a user