lib: clean up ECP5_RAM.v a bit

This commit is contained in:
David Anderson 2024-08-31 00:00:25 -07:00
parent 119eeceaef
commit efb5327f53
1 changed files with 67 additions and 177 deletions

View File

@ -1,57 +1,36 @@
module ECP5_RAM(CLKA, module ECP5_RAM#(
CEA, parameter GSR = "ENABLED",
OCEA, parameter RESETMODE = "SYNC",
WEA, parameter ASYNC_RESET_RELEASE = "SYNC",
DIA,
ADA,
CSA,
RSTA,
DOA,
CLKB, parameter DATA_WIDTH_A = 18,
CEB, parameter REGMODE_A = "NOREG",
OCEB, parameter WRITEMODE_A = "NORMAL",
WEB, parameter CSDECODE_A = "0b000",
DIB,
ADB,
CSB,
RSTB,
DOB);
parameter GSR = "ENABLED"; parameter DATA_WIDTH_B = 18,
parameter RESETMODE = "SYNC"; parameter REGMODE_B = "NOREG",
parameter ASYNC_RESET_RELEASE = "SYNC"; parameter WRITEMODE_B = "NORMAL",
parameter CSDECODE_B = "0b000"
parameter DATA_WIDTH_A = 18; )(input CLKA,
parameter REGMODE_A = "NOREG"; input RSTA,
parameter WRITEMODE_A = "NORMAL"; input CEA,
parameter CSDECODE_A = "0b000"; input OCEA,
input WEA,
parameter DATA_WIDTH_B = 18; input [2:0] CSA,
parameter REGMODE_B = "NOREG"; input [13:0] ADA,
parameter WRITEMODE_B = "NORMAL"; input [17:0] DIA,
parameter CSDECODE_B = "0b000"; output [17:0] DOA,
input CLKA;
input CEA;
input OCEA;
input WEA;
input [17:0] DIA;
input [13:0] ADA;
input [2:0] CSA;
input RSTA;
output [17:0] DOA;
input CLKB;
input CEB;
input OCEB;
input WEB;
input [17:0] DIB;
input [13:0] ADB;
input [2:0] CSB;
input RSTB;
output [17:0] DOB;
input CLKB,
input RSTB,
input CEB,
input OCEB,
input WEB,
input [2:0] CSB,
input [13:0] ADB,
input [17:0] DIB,
input [17:0] DOB);
DP16KD#(.GSR(GSR), DP16KD#(.GSR(GSR),
.RESETMODE(RESETMODE), .RESETMODE(RESETMODE),
.ASYNC_RESET_RELEASE(ASYNC_RESET_RELEASE), .ASYNC_RESET_RELEASE(ASYNC_RESET_RELEASE),
@ -62,121 +41,32 @@ module ECP5_RAM(CLKA,
.DATA_WIDTH_B(DATA_WIDTH_B), .DATA_WIDTH_B(DATA_WIDTH_B),
.REGMODE_B(REGMODE_B), .REGMODE_B(REGMODE_B),
.WRITEMODE_B(WRITEMODE_B), .WRITEMODE_B(WRITEMODE_B),
.CSDECODE_B(CSDECODE_B)) ram(.CLKA(CLKA), .CSDECODE_B(CSDECODE_B)
.CEA(CEA), ) ram(.CLKA(CLKA), .RSTA(RSTA), .CEA(CEA), .OCEA(OCEA), .WEA(WEA),
.OCEA(OCEA), .CSA2(CSA[2]), .CSA1(CSA[1]), .CSA0(CSA[0]),
.WEA(WEA), .ADA13(ADA[13]), .ADA12(ADA[12]), .ADA11(ADA[11]), .ADA10(ADA[10]), .ADA9(ADA[9]),
.DIA17(DIA[17]), .ADA8(ADA[8]), .ADA7(ADA[7]), .ADA6(ADA[6]), .ADA5(ADA[5]), .ADA4(ADA[4]),
.DIA16(DIA[16]), .ADA3(ADA[3]), .ADA2(ADA[2]), .ADA1(ADA[1]), .ADA0(ADA[0]),
.DIA15(DIA[15]), .DIA17(DIA[17]), .DIA16(DIA[16]), .DIA15(DIA[15]), .DIA14(DIA[14]), .DIA13(DIA[13]),
.DIA14(DIA[14]), .DIA12(DIA[12]), .DIA11(DIA[11]), .DIA10(DIA[10]), .DIA9(DIA[9]), .DIA8(DIA[8]),
.DIA13(DIA[13]), .DIA7(DIA[7]), .DIA6(DIA[6]), .DIA5(DIA[5]), .DIA4(DIA[4]), .DIA3(DIA[3]),
.DIA12(DIA[12]), .DIA2(DIA[2]), .DIA1(DIA[1]), .DIA0(DIA[0]),
.DIA11(DIA[11]), .DOA17(DOA[17]), .DOA16(DOA[16]), .DOA15(DOA[15]), .DOA14(DOA[14]), .DOA13(DOA[13]),
.DIA10(DIA[10]), .DOA12(DOA[12]), .DOA11(DOA[11]), .DOA10(DOA[10]), .DOA9(DOA[9]), .DOA8(DOA[8]),
.DIA9(DIA[9]), .DOA7(DOA[7]), .DOA6(DOA[6]), .DOA5(DOA[5]), .DOA4(DOA[4]), .DOA3(DOA[3]),
.DIA8(DIA[8]), .DOA2(DOA[2]), .DOA1(DOA[1]), .DOA0(DOA[0]),
.DIA7(DIA[7]),
.DIA6(DIA[6]),
.DIA5(DIA[5]),
.DIA4(DIA[4]),
.DIA3(DIA[3]),
.DIA2(DIA[2]),
.DIA1(DIA[1]),
.DIA0(DIA[0]),
.ADA13(ADA[13]),
.ADA12(ADA[12]),
.ADA11(ADA[11]),
.ADA10(ADA[10]),
.ADA9(ADA[9]),
.ADA8(ADA[8]),
.ADA7(ADA[7]),
.ADA6(ADA[6]),
.ADA5(ADA[5]),
.ADA4(ADA[4]),
.ADA3(ADA[3]),
.ADA2(ADA[2]),
.ADA1(ADA[1]),
.ADA0(ADA[0]),
.CSA2(CSA[2]),
.CSA1(CSA[1]),
.CSA0(CSA[0]),
.RSTA(RSTA),
.DOA17(DOA[17]),
.DOA16(DOA[16]),
.DOA15(DOA[15]),
.DOA14(DOA[14]),
.DOA13(DOA[13]),
.DOA12(DOA[12]),
.DOA11(DOA[11]),
.DOA10(DOA[10]),
.DOA9(DOA[9]),
.DOA8(DOA[8]),
.DOA7(DOA[7]),
.DOA6(DOA[6]),
.DOA5(DOA[5]),
.DOA4(DOA[4]),
.DOA3(DOA[3]),
.DOA2(DOA[2]),
.DOA1(DOA[1]),
.DOA0(DOA[0]),
.CLKB(CLKB), .CLKB(CLKB), .RSTB(RSTB), .CEB(CEB), .OCEB(OCEB), .WEB(WEB),
.CEB(CEB), .CSA2(CSA[2]), .CSA1(CSA[1]), .CSA0(CSA[0]),
.OCEB(OCEB), .ADB13(ADB[13]), .ADB12(ADB[12]), .ADB11(ADB[11]), .ADB10(ADB[10]), .ADB9(ADB[9]),
.WEB(WEB), .ADB8(ADB[8]), .ADB7(ADB[7]), .ADB6(ADB[6]), .ADB5(ADB[5]), .ADB4(ADB[4]),
.DIB17(DIB[17]), .ADB3(ADB[3]), .ADB2(ADB[2]), .ADB1(ADB[1]), .ADB0(ADB[0]),
.DIB16(DIB[16]), .DIB17(DIB[17]), .DIB16(DIB[16]), .DIB15(DIB[15]), .DIB14(DIB[14]), .DIB13(DIB[13]),
.DIB15(DIB[15]), .DIB12(DIB[12]), .DIB11(DIB[11]), .DIB10(DIB[10]), .DIB9(DIB[9]), .DIB8(DIB[8]),
.DIB14(DIB[14]), .DIB7(DIB[7]), .DIB6(DIB[6]), .DIB5(DIB[5]), .DIB4(DIB[4]), .DIB3(DIB[3]),
.DIB13(DIB[13]), .DIB2(DIB[2]), .DIB1(DIB[1]), .DIB0(DIB[0]),
.DIB12(DIB[12]), .DOB17(DOB[17]), .DOB16(DOB[16]), .DOB15(DOB[15]), .DOB14(DOB[14]), .DOB13(DOB[13]),
.DIB11(DIB[11]), .DOB12(DOB[12]), .DOB11(DOB[11]), .DOB10(DOB[10]), .DOB9(DOB[9]), .DOB8(DOB[8]),
.DIB10(DIB[10]), .DOB7(DOB[7]), .DOB6(DOB[6]), .DOB5(DOB[5]), .DOB4(DOB[4]), .DOB3(DOB[3]),
.DIB9(DIB[9]), .DOB2(DOB[2]), .DOB1(DOB[1]), .DOB0(DOB[0]));
.DIB8(DIB[8]),
.DIB7(DIB[7]),
.DIB6(DIB[6]),
.DIB5(DIB[5]),
.DIB4(DIB[4]),
.DIB3(DIB[3]),
.DIB2(DIB[2]),
.DIB1(DIB[1]),
.DIB0(DIB[0]),
.ADB13(ADB[13]),
.ADB12(ADB[12]),
.ADB11(ADB[11]),
.ADB10(ADB[10]),
.ADB9(ADB[9]),
.ADB8(ADB[8]),
.ADB7(ADB[7]),
.ADB6(ADB[6]),
.ADB5(ADB[5]),
.ADB4(ADB[4]),
.ADB3(ADB[3]),
.ADB2(ADB[2]),
.ADB1(ADB[1]),
.ADB0(ADB[0]),
.CSA2(CSA[2]),
.CSA1(CSA[1]),
.CSA0(CSA[0]),
.RSTB(RSTB),
.DOB17(DOB[17]),
.DOB16(DOB[16]),
.DOB15(DOB[15]),
.DOB14(DOB[14]),
.DOB13(DOB[13]),
.DOB12(DOB[12]),
.DOB11(DOB[11]),
.DOB10(DOB[10]),
.DOB9(DOB[9]),
.DOB8(DOB[8]),
.DOB7(DOB[7]),
.DOB6(DOB[6]),
.DOB5(DOB[5]),
.DOB4(DOB[4]),
.DOB3(DOB[3]),
.DOB2(DOB[2]),
.DOB1(DOB[1]),
.DOB0(DOB[0]));
endmodule endmodule