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("--disable-xics", action
="store_true",
16 help="Disable interrupts")
17 parser
.add_argument("--use-pll", action
="store_true", help="Enable pll")
18 parser
.add_argument("--disable-gpio", action
="store_true",
19 help="Disable gpio pins")
20 parser
.add_argument("--debug", default
="jtag", help="Select debug " \
21 "interface [jtag | dmi] [default jtag]")
23 args
= parser
.parse_args()
28 'cr': 1, 'branch': 1, 'trap': 1,
35 pspec
= TestMemPspec(ldst_ifacetype
='bare_wb',
36 imem_ifacetype
='bare_wb',
41 # set to 32 for instruction-memory width=32
43 # set to 32 to make data wishbone bus 32-bit
45 xics
=False if args
.disable_xics
else True,
46 # to help test coriolis2 ioring
49 use_pll
=True if args
.use_pll
else False,
51 gpio
=False if args
.disable_gpio
else True,
56 dut
= TestIssuer(pspec
)
58 vl
= verilog
.convert(dut
, ports
=dut
.external_ports(), name
="test_issuer")
59 with
open(args
.output_filename
, "w") as f
: