# for each: $ python3 setup.py develop # optional: --user
from c4m.nmigen.jtag.tap import TAP, IOType
+from nmigen_soc.wishbone.sram import SRAM
+from nmigen import Memory
class ADD(Elaboratable):
# have to create at least one shift register
self.sr = self.jtag.add_shiftreg(ircode=4, length=3)
+ # create and connect wishbone
+ self.wb = self.jtag.add_wishbone(ircodes=[5, 6, 7], features={'err'},
+ address_width=30, data_width=32,
+ granularity=8, # 8-bit wide
+ name="jtag_wb")
+
+ # create DMI2JTAG (goes through to dmi_sim())
+ self.dmi = self.jtag.add_dmi(ircodes=[8, 9, 10])
+
# add iotypes
self.io_a_0 = self.jtag.add_io(name="a_0", iotype=IOType.In)
self.io_a_1 = self.jtag.add_io(name="a_1", iotype=IOType.In)
m.d.comb += self.io_f_2.core.o.eq(f[2])
m.d.comb += self.io_f_3.core.o.eq(f[3])
+ # create a Memory
+ memory = Memory(width=32, depth=32)
+ sram = SRAM(memory=memory, granularity=8)
+
+ m.submodules.sram = sram
+
+ m.d.comb += sram.bus.cyc.eq(self.wb.cyc)
+ m.d.comb += sram.bus.stb.eq(self.wb.stb)
+ m.d.comb += sram.bus.we.eq(self.wb.we)
+ m.d.comb += sram.bus.sel.eq(self.wb.sel)
+ m.d.comb += sram.bus.adr.eq(self.wb.adr)
+ m.d.comb += sram.bus.dat_w.eq(self.wb.dat_w)
+
+ m.d.comb += self.wb.ack.eq(sram.bus.ack)
+ m.d.comb += self.wb.dat_r.eq(sram.bus.dat_r)
# do a simple "add"
m.d.sync += f.eq(a + b)
global af
rvalue = True
try:
+ coreSize = 10000
helpers.setTraceLevel( 550 )
cell, editor = plugins.kwParseMain( **kw )
cell = af.getCell( 'add', CRL.Catalog.State.Logical )
adderConf.editor = editor
adderConf.useSpares = True
adderConf.useClockTree = True
+ adderConf.useHFNS = True
+ adderConf.cfg.katana.hTracksReservedMin = 9
+ adderConf.cfg.katana.vTracksReservedMin = 2
adderConf.bColumns = 2
adderConf.bRows = 2
adderConf.chipConf.name = 'chip'
#adderConf.chipConf.ioPadGauge = 'LibreSOCIO'
adderConf.chipConf.ioPadGauge = 'niolib'
- adderConf.coreSize = ( l(2000), l(2000) )
- adderConf.chipSize = ( l(5900), l(5900) )
+ adderConf.coreSize = ( l(coreSize), l(coreSize) )
+ adderConf.chipSize = ( l(coreSize+3500), l(coreSize+3500) )
adderToChip = CoreToChip( adderConf )
adderToChip.buildChip()