How to leave interface unconnected?

Viewed 32

Is there any way to leave interface unconnected when we are instantiating gear?

For example:

collect(val = ram_model(write_addr = None,
                        write_data = None,
                        read_intf = res,
                        dtype = Fixp[8,8],
                        ram_mem = ram_dict), result = out)

In code above write_addr and write_data are interfaces.
I tired with "None" but I got error message:

-                      [INFO]: Running sim with seed: 6799883850526053181  
0                      [INFO]: -------------- Simulation start --------------  
16                     [INFO]: ----------- Simulation done ---------------  
16                     [INFO]: Elapsed: 0.03  
  File "ifm.py", line 48, in <module>
    collect(val = ram_model(write_addr = None,
GearArgsNotSpecified: [0], Unresolved argument "None" connected to the input "write_addr"
 - when instantiating "ram_model"
1 Answers

Solution is to create one additional gear. Code below shows how additional gear should look like:

from pygears.sim import clk
@gear
async def dummy(*, t) -> b't':
  await clk()
Related