Skip to content

Commit

Permalink
Merge pull request #153 from zeroasiccorp/fix
Browse files Browse the repository at this point in the history
fix sumi conversion
  • Loading branch information
gadfort authored Jul 31, 2024
2 parents 9b003b4 + 253bbbe commit 93f2b26
Show file tree
Hide file tree
Showing 14 changed files with 38 additions and 37 deletions.
2 changes: 1 addition & 1 deletion umi/lumi/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def setup(chip):
lib.add("option", "idir", "utils/rtl")
lib.add("option", "ydir", "utils/rtl")

lib.use(umi)
lib.use(sumi)

lib.use(auxlib)
lib.use(ramlib)
Expand Down
1 change: 1 addition & 0 deletions umi/sumi/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from siliconcompiler import Library
from lambdalib import auxlib, ramlib, vectorlib


def setup(chip):
lib = Library(chip, "sumi", package="umi", auto_enable=True)
lib.register_source("umi", "python://umi")
Expand Down
8 changes: 4 additions & 4 deletions umi/sumi/testbench/test_crossbar.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@
import numpy as np
from argparse import ArgumentParser
from switchboard import UmiTxRx, random_umi_packet, delete_queue, verilator_run, SbDut
from umi import umi
from umi import sumi


def build_testbench():
dut = SbDut('testbench', trace=False, default_main=True)

# Set up inputs
dut.input('umi/testbench/testbench_crossbar.sv', package='umi')
dut.input('sumi/testbench/testbench_crossbar.sv', package='umi')

dut.use(umi)
dut.use(sumi)

# Verilator configuration
dut.set('tool', 'verilator', 'task', 'compile', 'file', 'config', 'umi/testbench/config.vlt', package='umi')
dut.set('tool', 'verilator', 'task', 'compile', 'file', 'config', 'sumi/testbench/config.vlt', package='umi')
dut.add('tool', 'verilator', 'task', 'compile', 'option', '--prof-cfuncs')
dut.add('tool', 'verilator', 'task', 'compile', 'option', '-CFLAGS')
dut.add('tool', 'verilator', 'task', 'compile', 'option', '-DVL_DEBUG')
Expand Down
8 changes: 4 additions & 4 deletions umi/sumi/testbench/test_fifo.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@
import numpy as np
from argparse import ArgumentParser
from switchboard import SbDut, UmiTxRx, delete_queue, verilator_run
from umi import umi
from umi import sumi


def build_testbench():
dut = SbDut('testbench', trace=False, default_main=True)

# Set up inputs
dut.input('umi/testbench/testbench_fifo.sv', package='umi')
dut.input('sumi/testbench/testbench_fifo.sv', package='umi')

dut.use(umi)
dut.use(sumi)

# Verilator configuration
dut.set('tool', 'verilator', 'task', 'compile', 'file', 'config', 'umi/testbench/config.vlt', package='umi')
dut.set('tool', 'verilator', 'task', 'compile', 'file', 'config', 'sumi/testbench/config.vlt', package='umi')
# dut.set('option', 'relax', True)
dut.add('tool', 'verilator', 'task', 'compile', 'option', '--prof-cfuncs')
dut.add('tool', 'verilator', 'task', 'compile', 'option', '-CFLAGS')
Expand Down
8 changes: 4 additions & 4 deletions umi/sumi/testbench/test_fifo_flex.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,21 @@
import numpy as np
from argparse import ArgumentParser
from switchboard import SbDut, UmiTxRx, delete_queue, verilator_run
from umi import umi
from umi import sumi


def build_testbench(split=False):
dut = SbDut('testbench', trace=False, default_main=True)

# Set up inputs
dut.input('umi/testbench/testbench_fifo_flex.sv', package='umi')
dut.input('sumi/testbench/testbench_fifo_flex.sv', package='umi')

dut.use(umi)
dut.use(sumi)

dut.add('option', 'define', f'SPLIT={int(split)}')

# Verilator configuration
dut.set('tool', 'verilator', 'task', 'compile', 'file', 'config', 'umi/testbench/config.vlt', package='umi')
dut.set('tool', 'verilator', 'task', 'compile', 'file', 'config', 'sumi/testbench/config.vlt', package='umi')
# dut.set('option', 'relax', True)
dut.add('tool', 'verilator', 'task', 'compile', 'option', '--prof-cfuncs')
dut.add('tool', 'verilator', 'task', 'compile', 'option', '-CFLAGS')
Expand Down
8 changes: 4 additions & 4 deletions umi/sumi/testbench/test_mem_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@
import numpy as np
from argparse import ArgumentParser
from switchboard import SbDut, UmiTxRx, delete_queue, verilator_run
from umi import umi
from umi import sumi


def build_testbench():
dut = SbDut('testbench', trace=False, default_main=True)

# Set up inputs
dut.input('umi/testbench/testbench_mem_agent.sv', package='umi')
dut.input('sumi/testbench/testbench_mem_agent.sv', package='umi')

dut.use(umi)
dut.use(sumi)

# Verilator configuration
dut.set('tool', 'verilator', 'task', 'compile', 'file', 'config', 'umi/testbench/config.vlt', package='umi')
dut.set('tool', 'verilator', 'task', 'compile', 'file', 'config', 'sumi/testbench/config.vlt', package='umi')
# dut.set('option', 'relax', True)
dut.add('tool', 'verilator', 'task', 'compile', 'option', '--prof-cfuncs')
dut.add('tool', 'verilator', 'task', 'compile', 'option', '-CFLAGS')
Expand Down
8 changes: 4 additions & 4 deletions umi/sumi/testbench/test_regif.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@
import numpy as np
from argparse import ArgumentParser
from switchboard import SbDut, UmiTxRx, delete_queue, verilator_run
from umi import umi
from umi import sumi


def build_testbench():
dut = SbDut('testbench', trace=False, default_main=True)

# Set up inputs
dut.input('umi/testbench/testbench_regif.sv', package='umi')
dut.input('sumi/testbench/testbench_regif.sv', package='umi')

dut.use(umi)
dut.use(sumi)

# Verilator configuration
dut.set('tool', 'verilator', 'task', 'compile', 'file', 'config', 'umi/testbench/config.vlt', package='umi')
dut.set('tool', 'verilator', 'task', 'compile', 'file', 'config', 'sumi/testbench/config.vlt', package='umi')
# dut.set('option', 'relax', True)
dut.add('tool', 'verilator', 'task', 'compile', 'option', '--prof-cfuncs')
dut.add('tool', 'verilator', 'task', 'compile', 'option', '-CFLAGS')
Expand Down
8 changes: 4 additions & 4 deletions umi/sumi/testbench/test_umi_ram.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@
import numpy as np
from argparse import ArgumentParser
from switchboard import SbDut, UmiTxRx, verilator_run
from umi import umi
from umi import sumi


def build_testbench():
dut = SbDut('testbench', trace=False, default_main=True)

# Set up inputs
dut.input('umi/testbench/testbench_umi_ram.sv', package='umi')
dut.input('sumi/testbench/testbench_umi_ram.sv', package='umi')

dut.use(umi)
dut.use(sumi)

# Verilator configuration
dut.set('tool', 'verilator', 'task', 'compile', 'file', 'config', 'umi/testbench/config.vlt', package='umi')
dut.set('tool', 'verilator', 'task', 'compile', 'file', 'config', 'sumi/testbench/config.vlt', package='umi')
# dut.set('option', 'relax', True)
dut.add('tool', 'verilator', 'task', 'compile', 'option', '--prof-cfuncs')
dut.add('tool', 'verilator', 'task', 'compile', 'option', '-CFLAGS')
Expand Down
4 changes: 2 additions & 2 deletions umi/utils/testbench/test_tl2umi_np.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
from siliconcompiler import Chip
from siliconcompiler.flows import dvflow
from siliconcompiler.package import path as sc_path
from umi import umi
from umi import sumi


def build():
chip = Chip('tb_tl2umi_np')
chip.use(umi)
chip.use(sumi)
chip.use(dvflow, tool='icarus')

chip.set('option', 'flow', 'dvflow')
Expand Down
4 changes: 2 additions & 2 deletions umi/utils/testbench/test_umi2apb.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
import random
import numpy as np
from switchboard import SbDut, UmiTxRx, verilator_run
from umi import umi
from umi import sumi


def build_testbench(dut):
# Set up inputs
dut.input('utils/testbench/testbench_umi2apb.sv', package='umi')

dut.use(umi)
dut.use(sumi)

# Verilator configuration
dut.set('tool', 'verilator', 'task', 'compile', 'file', 'config', 'utils/testbench/config.vlt',
Expand Down
4 changes: 2 additions & 2 deletions umi/utils/testbench/test_umi2axilite.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import numpy as np
from argparse import ArgumentParser
from switchboard import SbDut, UmiTxRx, delete_queue, verilator_run
from umi import umi
from umi import sumi


def build_testbench():
Expand All @@ -16,7 +16,7 @@ def build_testbench():
# Set up inputs
dut.input('utils/testbench/testbench_umi2axilite.sv', package='umi')

dut.use(umi)
dut.use(sumi)

# Verilator configuration
dut.set('tool', 'verilator', 'task', 'compile', 'file', 'config',
Expand Down
4 changes: 2 additions & 2 deletions umi/utils/testbench/test_umi2tl_np.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from argparse import ArgumentParser
from switchboard import SbDut, UmiTxRx, delete_queue, verilator_run
from siliconcompiler.package import path as sc_path
from umi import umi
from umi import sumi


def build_testbench(topo="2d"):
Expand All @@ -28,7 +28,7 @@ def build_testbench(topo="2d"):
dut.input('utils/testbench/testbench_umi2tl_np.cc', package='umi')
dut.input('utils/testbench/tlmemsim.cpp', package='umi')

dut.use(umi)
dut.use(sumi)

# Verilator configuration
dut.add('tool', 'verilator', 'task', 'compile', 'option', '--coverage')
Expand Down
4 changes: 2 additions & 2 deletions umi/utils/testbench/test_umi_address_remap.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import random
from argparse import ArgumentParser
from switchboard import SbDut, UmiTxRx, delete_queue, verilator_run, random_umi_packet
from umi import umi
from umi import sumi


def build_testbench(topo="2d"):
Expand All @@ -22,7 +22,7 @@ def build_testbench(topo="2d"):
else:
raise ValueError('Invalid topology')

dut.use(umi)
dut.use(sumi)

# Verilator configuration
dut.set('tool', 'verilator', 'task', 'compile', 'file', 'config', 'utils/testbench/config.vlt', package='umi')
Expand Down
4 changes: 2 additions & 2 deletions umi/utils/testbench/test_umi_packet_merge_greedy.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from argparse import ArgumentParser
from switchboard import SbDut, UmiTxRx, delete_queue, verilator_run, random_umi_packet
from umi import umi
from umi import sumi


def build_testbench(topo="2d"):
Expand All @@ -23,7 +23,7 @@ def build_testbench(topo="2d"):

dut.input('utils/testbench/testbench_umi_packet_merge_greedy.cc', package='umi')

dut.use(umi)
dut.use(sumi)

# Verilator configuration
dut.set('tool', 'verilator', 'task', 'compile', 'file', 'config', 'utils/testbench/config.vlt', package='umi')
Expand Down

0 comments on commit 93f2b26

Please sign in to comment.