Skip to content

Commit

Permalink
Merge branch 'coredac:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
yuqisun authored Dec 2, 2024
2 parents 182ae58 + 6ae3ed4 commit bffa83b
Show file tree
Hide file tree
Showing 144 changed files with 1,858 additions and 831 deletions.
1 change: 1 addition & 0 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,5 @@ jobs:
pytest ../cgra/translate/CGRAMemBottomRTL_matmul_2x2_test.py -xvs --tb=short --test-verilog --dump-vtb --dump-vcd
pytest ../cgra/translate/CGRAMemRightAndBottomRTL_matmul_2x2_test.py -xvs --tb=short
pytest ../cgra/translate/CGRAMemRightAndBottomRTL_matmul_2x2_test.py -xvs --tb=short --test-verilog --dump-vtb --dump-vcd
pytest ../noc/PyOCN/pymtl3_net/ringnet/test/RingNetworkRTL_test.py --tb=short -sv
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@
[submodule "fu/dp_fpfma"]
path = fu/dp_fpfma
url = https://github.com/tancheng/dp_fpfma
[submodule "noc/PyOCN"]
path = noc/PyOCN
url = https://github.com/tancheng/PyOCN
15 changes: 8 additions & 7 deletions cgra/CGRACL.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,15 @@
Date : Dec 28, 2019
"""

from pymtl3 import *
from ..noc.CrossbarRTL import CrossbarRTL
from ..noc.ChannelRTL import ChannelRTL
from ..tile.TileCL import TileCL
from ..lib.opt_type import *
from ..lib.common import *
from ..lib.ifcs import SendIfcRTL, RecvIfcRTL
from pymtl3 import *
from ..lib.basic.en_rdy.ifcs import SendIfcRTL, RecvIfcRTL
from ..lib.opt_type import *
from ..lib.util.common import *
from ..noc.CrossbarRTL import CrossbarRTL
from ..noc.ChannelRTL import ChannelRTL
from ..mem.data.DataMemCL import DataMemCL
from ..tile.TileCL import TileCL


class CGRACL( Component ):

Expand Down
3 changes: 1 addition & 2 deletions cgra/CGRAFL.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@
Author : Cheng Tan
Date : Feb 13, 2020
"""

from pymtl3 import *
from pymtl3 import *
from ..lib.opt_type import *
from ..lib.messages import *

Expand Down
23 changes: 12 additions & 11 deletions cgra/CGRAKingMeshRTL.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,20 @@
Date : Dec 15, 2019
"""

from pymtl3 import *
from ..lib.ifcs import SendIfcRTL, RecvIfcRTL
from ..noc.CrossbarRTL import CrossbarRTL
from ..noc.ChannelRTL import ChannelRTL
from ..tile.TileRTL import TileRTL
from ..lib.opt_type import *
from ..lib.common import *
from ..mem.data.DataMemRTL import DataMemRTL
from ..mem.data.DataMemCL import DataMemCL
from ..fu.single.MemUnitRTL import MemUnitRTL
from ..fu.single.AdderRTL import AdderRTL
from pymtl3 import *
from ..lib.basic.en_rdy.ifcs import SendIfcRTL, RecvIfcRTL
from ..noc.CrossbarRTL import CrossbarRTL
from ..noc.ChannelRTL import ChannelRTL
from ..tile.TileRTL import TileRTL
from ..lib.opt_type import *
from ..lib.util.common import *
from ..mem.data.DataMemRTL import DataMemRTL
from ..mem.data.DataMemCL import DataMemCL
from ..fu.single.MemUnitRTL import MemUnitRTL
from ..fu.single.AdderRTL import AdderRTL
from ..fu.flexible.FlexibleFuRTL import FlexibleFuRTL


class CGRAKingMeshRTL( Component ):

def construct( s, DataType, PredicateType, CtrlType, width, height,
Expand Down
22 changes: 11 additions & 11 deletions cgra/CGRAMemBottomRTL.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@
Date : Nov 18, 2024
"""

from pymtl3 import *
from ..lib.ifcs import SendIfcRTL, RecvIfcRTL
from ..noc.CrossbarRTL import CrossbarRTL
from ..noc.ChannelRTL import ChannelRTL
from ..tile.TileRTL import TileRTL
from ..lib.opt_type import *
from ..lib.common import *
from ..mem.data.DataMemRTL import DataMemRTL
from ..mem.data.DataMemCL import DataMemCL
from ..fu.single.MemUnitRTL import MemUnitRTL
from ..fu.single.AdderRTL import AdderRTL
from pymtl3 import *
from ..fu.flexible.FlexibleFuRTL import FlexibleFuRTL
from ..fu.single.MemUnitRTL import MemUnitRTL
from ..fu.single.AdderRTL import AdderRTL
from ..lib.basic.en_rdy.ifcs import SendIfcRTL, RecvIfcRTL
from ..lib.opt_type import *
from ..lib.util.common import *
from ..mem.data.DataMemRTL import DataMemRTL
from ..mem.data.DataMemCL import DataMemCL
from ..noc.ChannelRTL import ChannelRTL
from ..noc.CrossbarRTL import CrossbarRTL
from ..tile.TileRTL import TileRTL

class CGRAMemBottomRTL(Component):

Expand Down
23 changes: 12 additions & 11 deletions cgra/CGRAMemRightAndBottomRTL.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,19 @@
Date : Nov 19, 2024
"""

from pymtl3 import *
from ..lib.ifcs import SendIfcRTL, RecvIfcRTL
from ..noc.CrossbarRTL import CrossbarRTL
from ..noc.ChannelRTL import ChannelRTL
from ..tile.TileRTL import TileRTL
from ..lib.opt_type import *
from ..lib.common import *
from ..mem.data.DataMemRTL import DataMemRTL
from ..mem.data.DataMemCL import DataMemCL
from ..fu.single.MemUnitRTL import MemUnitRTL
from ..fu.single.AdderRTL import AdderRTL
from pymtl3 import *
from ..fu.flexible.FlexibleFuRTL import FlexibleFuRTL
from ..fu.single.MemUnitRTL import MemUnitRTL
from ..fu.single.AdderRTL import AdderRTL
from ..lib.basic.en_rdy.ifcs import SendIfcRTL, RecvIfcRTL
from ..lib.opt_type import *
from ..lib.util.common import *
from ..mem.data.DataMemRTL import DataMemRTL
from ..mem.data.DataMemCL import DataMemCL
from ..noc.ChannelRTL import ChannelRTL
from ..noc.CrossbarRTL import CrossbarRTL
from ..tile.TileRTL import TileRTL


class CGRAMemRightAndBottomRTL(Component):

Expand Down
23 changes: 12 additions & 11 deletions cgra/CGRARTL.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,19 @@
Date : Dec 15, 2019
"""

from pymtl3 import *
from ..lib.ifcs import SendIfcRTL, RecvIfcRTL
from ..noc.CrossbarRTL import CrossbarRTL
from ..noc.ChannelRTL import ChannelRTL
from ..tile.TileRTL import TileRTL
from ..lib.opt_type import *
from ..lib.common import *
from ..mem.data.DataMemRTL import DataMemRTL
from ..mem.data.DataMemCL import DataMemCL
from ..fu.single.MemUnitRTL import MemUnitRTL
from ..fu.single.AdderRTL import AdderRTL
from pymtl3 import *
from ..fu.flexible.FlexibleFuRTL import FlexibleFuRTL
from ..fu.single.MemUnitRTL import MemUnitRTL
from ..fu.single.AdderRTL import AdderRTL
from ..lib.basic.en_rdy.ifcs import SendIfcRTL, RecvIfcRTL
from ..lib.opt_type import *
from ..lib.util.common import *
from ..mem.data.DataMemRTL import DataMemRTL
from ..mem.data.DataMemCL import DataMemCL
from ..noc.ChannelRTL import ChannelRTL
from ..noc.CrossbarRTL import CrossbarRTL
from ..tile.TileRTL import TileRTL


class CGRARTL( Component ):

Expand Down
5 changes: 3 additions & 2 deletions cgra/CGRASeparateCrossbarRTL.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,16 @@
from ..fu.flexible.FlexibleFuRTL import FlexibleFuRTL
from ..fu.single.MemUnitRTL import MemUnitRTL
from ..fu.single.AdderRTL import AdderRTL
from ..lib.common import *
from ..lib.ifcs import SendIfcRTL, RecvIfcRTL
from ..lib.util.common import *
from ..lib.basic.en_rdy.ifcs import SendIfcRTL, RecvIfcRTL
from ..lib.opt_type import *
from ..mem.data.DataMemCL import DataMemCL
from ..mem.data.DataMemRTL import DataMemRTL
from ..noc.ChannelNormalRTL import ChannelNormalRTL
from ..noc.CrossbarSeparateRTL import CrossbarSeparateRTL
from ..tile.TileSeparateCrossbarRTL import TileSeparateCrossbarRTL


class CGRASeparateCrossbarRTL(Component):
def construct(s, DataType, PredicateType, CtrlType, width, height,
ctrl_mem_size, data_mem_size, num_ctrl, total_steps,
Expand Down
24 changes: 13 additions & 11 deletions cgra/CGRATemplateRTL.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,20 @@
Date : Dec 15, 2019
"""

from pymtl3 import *
from ..lib.ifcs import SendIfcRTL, RecvIfcRTL
from ..noc.CrossbarRTL import CrossbarRTL
from ..noc.ChannelRTL import ChannelRTL
from ..tile.TileRTL import TileRTL
from ..lib.opt_type import *
from ..lib.common import *
from ..mem.data.DataMemRTL import DataMemRTL
from ..mem.data.DataMemCL import DataMemCL
from ..fu.single.MemUnitRTL import MemUnitRTL
from ..fu.single.AdderRTL import AdderRTL

from pymtl3 import *
from ..fu.flexible.FlexibleFuRTL import FlexibleFuRTL
from ..fu.single.MemUnitRTL import MemUnitRTL
from ..fu.single.AdderRTL import AdderRTL
from ..lib.basic.en_rdy.ifcs import SendIfcRTL, RecvIfcRTL
from ..lib.opt_type import *
from ..lib.util.common import *
from ..mem.data.DataMemRTL import DataMemRTL
from ..mem.data.DataMemCL import DataMemCL
from ..noc.ChannelRTL import ChannelRTL
from ..noc.CrossbarRTL import CrossbarRTL
from ..tile.TileRTL import TileRTL


class CGRATemplateRTL( Component ):

Expand Down
35 changes: 16 additions & 19 deletions cgra/test/CGRACL_FIR_demo_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,32 +6,29 @@
Author : Cheng Tan
Date : Dec 28, 2019
"""

from pymtl3 import *

from ...lib.opt_type import *
from ...lib.messages import *

from pymtl3 import *
from ..CGRACL import CGRACL
from ..CGRAFL import CGRAFL
from ...fu.flexible.FlexibleFuRTL import FlexibleFuRTL
from ...fu.single.AdderRTL import AdderRTL
from ...fu.single.MulRTL import MulRTL
from ...fu.single.LogicRTL import LogicRTL
from ...fu.single.CompRTL import CompRTL
from ...fu.single.BranchRTL import BranchRTL
from ...fu.single.PhiRTL import PhiRTL
from ...fu.single.ShifterRTL import ShifterRTL
from ...fu.single.MemUnitRTL import MemUnitRTL
from ..CGRACL import CGRACL

from ..CGRAFL import CGRAFL
from ...lib.dfg_helper import *
from ...lib.ctrl_helper import *

from ...fu.single.AdderRTL import AdderRTL
from ...fu.single.MulRTL import MulRTL
from ...fu.single.BranchRTL import BranchRTL
from ...fu.single.CompRTL import CompRTL
from ...fu.single.LogicRTL import LogicRTL
from ...fu.single.MemUnitRTL import MemUnitRTL
from ...fu.single.PhiRTL import PhiRTL
from ...fu.single.ShifterRTL import ShifterRTL
from ...lib.util.ctrl_helper import *
from ...lib.util.dfg_helper import *
from ...lib.messages import *
from ...lib.opt_type import *
import copy
import os


#-------------------------------------------------------------------------
# Test harness
#-------------------------------------------------------------------------
Expand Down
26 changes: 12 additions & 14 deletions cgra/test/CGRACL_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,24 @@
Author : Cheng Tan
Date : Dec 28, 2019
"""

from pymtl3 import *

from ...lib.opt_type import *
from ...lib.messages import *
from ...lib.ctrl_helper import *

from pymtl3 import *
from ..CGRACL import CGRACL
from ...fu.flexible.FlexibleFuRTL import FlexibleFuRTL
from ...fu.single.AdderRTL import AdderRTL
from ...fu.single.MulRTL import MulRTL
from ...fu.single.PhiRTL import PhiRTL
from ...fu.single.CompRTL import CompRTL
from ...fu.single.BranchRTL import BranchRTL
from ...fu.single.MemUnitRTL import MemUnitRTL
from ..CGRACL import CGRACL

from ...fu.single.AdderRTL import AdderRTL
from ...fu.single.MulRTL import MulRTL
from ...fu.single.PhiRTL import PhiRTL
from ...fu.single.CompRTL import CompRTL
from ...fu.single.BranchRTL import BranchRTL
from ...fu.single.MemUnitRTL import MemUnitRTL
from ...lib.opt_type import *
from ...lib.messages import *
from ...lib.util.ctrl_helper import *
import os


#-------------------------------------------------------------------------
# Test harness
#-------------------------------------------------------------------------
Expand Down
9 changes: 5 additions & 4 deletions cgra/test/CGRAFL_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,14 @@
"""

from pymtl3 import *
from ...lib.messages import *
from ..CGRAFL import CGRAFL
from ...lib.dfg_helper import *

from pymtl3 import *
from ...lib.messages import *
from ..CGRAFL import CGRAFL
from ...lib.util.dfg_helper import *
import os


def test_fl():
target_json = "dfg_fir.json"
script_dir = os.path.dirname(__file__)
Expand Down
25 changes: 12 additions & 13 deletions cgra/test/CGRAKingMeshRTL_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,23 @@
Author : Cheng Tan
Date : Dec 15, 2019
"""

from pymtl3 import *
from pymtl3.stdlib.test_utils import (run_sim,
config_model_with_cmdline_opts)

from pymtl3 import *
from pymtl3.stdlib.test_utils import (run_sim,
config_model_with_cmdline_opts)
from pymtl3.passes.backends.verilog import (VerilogTranslationPass,
VerilogVerilatorImportPass)

from ...lib.test_srcs import TestSrcRTL
from ...lib.opt_type import *
from ...lib.messages import *

from ..CGRAKingMeshRTL import CGRAKingMeshRTL
from ...fu.flexible.FlexibleFuRTL import FlexibleFuRTL
from ...fu.single.AdderRTL import AdderRTL
from ...fu.single.ShifterRTL import ShifterRTL
from ...fu.single.MemUnitRTL import MemUnitRTL
from ..CGRAKingMeshRTL import CGRAKingMeshRTL
from ...fu.single.AdderRTL import AdderRTL
from ...fu.single.MemUnitRTL import MemUnitRTL
from ...fu.single.ShifterRTL import ShifterRTL
from ...lib.basic.en_rdy.test_srcs import TestSrcRTL
from ...lib.messages import *
from ...lib.opt_type import *


#-------------------------------------------------------------------------
# Test harness
Expand Down
Loading

0 comments on commit bffa83b

Please sign in to comment.