Ejemplo n.º 1
0
def hdlgen_wspy(rtldir, dut):
    bind('debug/trace', [''])
    bind('svgen/spy_connection_template', signal_spy_connect_t)

    hdlgen(
        f"/{dut.name}",
        outdir=rtldir,
        wrapper=True,
        copy_files=True)
Ejemplo n.º 2
0
def svgen_cascade(xml_file, img_size, outdir):
    cascade_hw = CascadeHW(xml_file, img_size=img_size)
    din_t = Queue[Uint[8], 1]
    detected_addr, interrupt = cascade_classifier(din=drv(t=din_t, seq=[]),
                                                  casc_hw=cascade_hw)

    detected_addr | shred
    interrupt | shred

    bind('debug/trace', [])
    hdlgen('/cascade_classifier', outdir=outdir, wrapper=True, copy_files=True)
    # print(list_hdl_files('/cascade_classifier', outdir='/tools/tmp/', language='sv'))

    # print("Copying svlib files to project")
    # copy_svlib()
    print("Replacing producer, consumer strings with master, slave")
    sed_intf(producer='master', consumer='slave')
Ejemplo n.º 3
0
import os
from pygears.conf.registry import registry, bind

svlib_dir = os.path.join(os.path.dirname(__file__), 'gears', 'svlib')
registry('hdl/include').append(svlib_dir)

bind('debug/trace', ['*'])
Ejemplo n.º 4
0
from pygears.typing import Queue, Uint
from pygears.lib.verif import drv
from pygears.lib import shred
from pygears.hdl import hdlgen
from pygears.conf.registry import bind
from pygears.synth import list_hdl_files

from string import Template
signal_spy_connect_t = Template("""
/*verilator tracing_on*/
${intf_name}_t ${intf_name}_data;
logic ${intf_name}_valid;
logic ${intf_name}_ready;
/*verilator tracing_off*/

assign ${intf_name}_data = ${conn_name}.data;
assign ${intf_name}_valid = ${conn_name}.valid;
assign ${intf_name}_ready = ${conn_name}.ready;
""")

din_t = Queue[Uint[8], 2]

ii_gen(din=drv(t=din_t, seq=[]), frame_size=(5, 5))

bind('hdl/debug_intfs', [''])
bind('hdl/spy_connection_template', signal_spy_connect_t)
hdlgen('/ii_gen', outdir="rtl/build", wrapper=True, copy_files=True)
# print(list_hdl_files('/ii_gen', outdir='rtl/build', language='sv', rtl_only=True))

# copy_svlib(list_hdl_files('/ii_gen', outdir='rtl/build', language='sv', rtl_only=True))
Ejemplo n.º 5
0
import os
from pygears.conf.registry import registry, bind
from cascade_classifier.pygears_impl import design as design_dir

package_dir = os.path.dirname(design_dir.__file__)

svlib_dir = os.path.join(package_dir, 'gears', 'svlib')
registry('hdl/include_paths').append(svlib_dir)

bind('hdl/debug_intfs', ['*'])