Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gowin. Add the EMCU primitive. #4594

Merged
merged 1 commit into from
Sep 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
98 changes: 98 additions & 0 deletions techlibs/gowin/cells_sim.v
Original file line number Diff line number Diff line change
Expand Up @@ -1966,5 +1966,103 @@ output CLKOUT;
parameter DCS_MODE = "RISING";
endmodule

(* blackbox *)
module EMCU (
input FCLK,
input PORESETN,
input SYSRESETN,
input RTCSRCCLK,
output [15:0] IOEXPOUTPUTO,
output [15:0] IOEXPOUTPUTENO,
input [15:0] IOEXPINPUTI,
output UART0TXDO,
output UART1TXDO,
output UART0BAUDTICK,
output UART1BAUDTICK,
input UART0RXDI,
input UART1RXDI,
output INTMONITOR,
output MTXHRESETN,
output [12:0] SRAM0ADDR,
output [3:0] SRAM0WREN,
output [31:0] SRAM0WDATA,
output SRAM0CS,
input [31:0] SRAM0RDATA,
output TARGFLASH0HSEL,
output [28:0] TARGFLASH0HADDR,
output [1:0] TARGFLASH0HTRANS,
output [2:0] TARGFLASH0HSIZE,
output [2:0] TARGFLASH0HBURST,
output TARGFLASH0HREADYMUX,
input [31:0] TARGFLASH0HRDATA,
input [2:0] TARGFLASH0HRUSER,
input TARGFLASH0HRESP,
input TARGFLASH0EXRESP,
input TARGFLASH0HREADYOUT,
output TARGEXP0HSEL,
output [31:0] TARGEXP0HADDR,
output [1:0] TARGEXP0HTRANS,
output TARGEXP0HWRITE,
output [2:0] TARGEXP0HSIZE,
output [2:0] TARGEXP0HBURST,
output [3:0] TARGEXP0HPROT,
output [1:0] TARGEXP0MEMATTR,
output TARGEXP0EXREQ,
output [3:0] TARGEXP0HMASTER,
output [31:0] TARGEXP0HWDATA,
output TARGEXP0HMASTLOCK,
output TARGEXP0HREADYMUX,
output TARGEXP0HAUSER,
output [3:0] TARGEXP0HWUSER,
input [31:0] TARGEXP0HRDATA,
input TARGEXP0HREADYOUT,
input TARGEXP0HRESP,
input TARGEXP0EXRESP,
input [2:0] TARGEXP0HRUSER,
output [31:0] INITEXP0HRDATA,
output INITEXP0HREADY,
output INITEXP0HRESP,
output INITEXP0EXRESP,
output [2:0] INITEXP0HRUSER,
input INITEXP0HSEL,
input [31:0] INITEXP0HADDR,
input [1:0] INITEXP0HTRANS,
input INITEXP0HWRITE,
input [2:0] INITEXP0HSIZE,
input [2:0] INITEXP0HBURST,
input [3:0] INITEXP0HPROT,
input [1:0] INITEXP0MEMATTR,
input INITEXP0EXREQ,
input [3:0] INITEXP0HMASTER,
input [31:0] INITEXP0HWDATA,
input INITEXP0HMASTLOCK,
input INITEXP0HAUSER,
input [3:0] INITEXP0HWUSER,
output [3:0] APBTARGEXP2PSTRB,
output [2:0] APBTARGEXP2PPROT,
output APBTARGEXP2PSEL,
output APBTARGEXP2PENABLE,
output [11:0] APBTARGEXP2PADDR,
output APBTARGEXP2PWRITE,
output [31:0] APBTARGEXP2PWDATA,
input [31:0] APBTARGEXP2PRDATA,
input APBTARGEXP2PREADY,
input APBTARGEXP2PSLVERR,
input [3:0] MTXREMAP,
output DAPTDO,
output DAPJTAGNSW,
output DAPNTDOEN,
input DAPSWDITMS,
input DAPTDI,
input DAPNTRST,
input DAPSWCLKTCK,
output [3:0] TPIUTRACEDATA,
output TPIUTRACECLK,
input [4:0] GPINT,
input FLASHERR,
input FLASHINT

);
endmodule


2 changes: 1 addition & 1 deletion techlibs/gowin/cells_xtra.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class State(Enum):
'OSCO', 'OSCW', 'OSCZ', 'OSER10', 'OSER16', 'OSER10', 'OSER4',
'OSER8', 'OVIDEO', 'PLLVR', 'RAM16S1', 'RAM16S2', 'RAM16S4',
'RAM16SDP1', 'RAM16SDP2', 'RAM16SDP4', 'rPLL', 'SDP',
'SDPX9', 'SP', 'SPX9', 'TBUF', 'TLVDS_OBUF', 'VCC'
'SDPX9', 'SP', 'SPX9', 'TBUF', 'TLVDS_OBUF', 'VCC', 'DCS', 'EMCU'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume this is a forgotten change from #4489 but that's fine

}
def xtract_cells_decl(dir, fout):
fname = os.path.join(dir, 'prim_sim.v')
Expand Down
3 changes: 0 additions & 3 deletions techlibs/gowin/cells_xtra.v
Original file line number Diff line number Diff line change
Expand Up @@ -1699,9 +1699,6 @@ input CLKIN, CE;
output CLKOUT, CLKOUTN;
endmodule

module EMCU (...);
endmodule

module FLASH64K (...);
input[4:0]XADR;
input[5:0]YADR;
Expand Down
Loading