92ec2f54a25815ec82e7c7948c6a47a1d785610b
1 """simple core issuer verilog generator
5 from nmigen
.cli
import verilog
7 from soc
.config
.test
.test_loadstore
import TestMemPspec
8 from soc
.simple
.issuer
import TestIssuer
11 if __name__
== '__main__':
12 parser
= argparse
.ArgumentParser(description
="Simple core issuer " \
14 parser
.add_argument("output_filename")
15 parser
.add_argument("--enable-xics", action
="store_true",
16 help="Enable interrupts",
18 parser
.add_argument("--enable-core", action
="store_true",
19 help="Enable main core",
21 parser
.add_argument("--use-pll", action
="store_true", help="Enable pll",
23 parser
.add_argument("--enable-testgpio", action
="store_true",
24 help="Disable gpio pins",
26 parser
.add_argument("--debug", default
="jtag", help="Select debug " \
27 "interface [jtag | dmi] [default jtag]")
29 args
= parser
.parse_args()
34 'cr': 1, 'branch': 1, 'trap': 1,
41 pspec
= TestMemPspec(ldst_ifacetype
='bare_wb',
42 imem_ifacetype
='bare_wb',
47 # set to 32 for instruction-memory width=32
49 # set to 32 to make data wishbone bus 32-bit
51 xics
=args
.enable_xics
, # XICS interrupt controller
52 nocore
=not args
.enable_core
, # test coriolis2 ioring
53 use_pll
=args
.use_pll
, # bypass PLL
54 gpio
=args
.enable_testgpio
, # for test purposes
55 debug
=args
.debug
, # set to jtag or dmi
58 dut
= TestIssuer(pspec
)
60 vl
= verilog
.convert(dut
, ports
=dut
.external_ports(), name
="test_issuer")
61 with
open(args
.output_filename
, "w") as f
: