-def sim_iomux(dut):
- # start by setting portin0
- dut.portin0["o"].eq(1)
- dut.portin0["oe"].eq(1)
- yield
- dut.portout["i"].eq(1)
-
- print("Finished the IO mux block test!")
-
-def test_iomux():
-
+def gen_gtkw_doc(module_name, n_banks, filename):
+ # GTKWave doc generation
+ style = {
+ '': {'base': 'hex'},
+ 'in': {'color': 'orange'},
+ 'out': {'color': 'yellow'},
+ 'debug': {'module': 'top', 'color': 'red'}
+ }
+
+ # Create a trace list, each block expected to be a tuple()
+ traces = []
+ for bank in range(0, n_banks):
+ temp_traces = ('Bank{}'.format(bank), [
+ ('bank{}__i'.format(bank), 'in'),
+ ('bank{}__o'.format(bank), 'out'),
+ ('bank{}__oe'.format(bank), 'out')
+ ])
+ traces.append(temp_traces)
+ #print(traces)
+
+ write_gtkw(filename+".gtkw", filename+".vcd", traces, style,
+ module=module_name)
+
+def sim_iomux():
+ filename = "test_pinmux" # Doesn't include extension