Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 15 additions & 14 deletions flow/designs/asap7/cva6/config.mk
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ export VERILOG_FILES = $(sort $(wildcard $(SRC_HOME)/common/local/util/
$(SRC_HOME)/core/cache_subsystem/hpdcache/rtl/src/hwpf_stride/hwpf_stride_wrapper.sv \
$(sort $(wildcard $(SRC_HOME)/core/cache_subsystem/*.sv)) \
$(sort $(wildcard $(SRC_HOME)/core/cache_subsystem/hpdcache/rtl/src/common/*.sv)) \
$(sort $(wildcard $(SRC_HOME)/core/cache_subsystem/hpdcache/rtl/src/common/macros/blackbox/*.sv)) \
$(SRC_HOME)/core/cache_subsystem/hpdcache/rtl/src/common/macros/behav/hpdcache_sram_1rw.sv \
$(SRC_HOME)/core/cache_subsystem/hpdcache/rtl/src/common/macros/behav/hpdcache_sram_wbyteenable_1rw.sv \
$(sort $(wildcard $(SRC_HOME)/core/cache_subsystem/hpdcache/rtl/src/utils/*.sv)) \
$(sort $(wildcard $(SRC_HOME)/core/cva6_mmu/*.sv)) \
$(SRC_HOME)/core/cvfpu/src/fpu_div_sqrt_mvp/hdl/defs_div_sqrt_mvp.sv \
Expand All @@ -64,27 +65,27 @@ export VERILOG_FILES = $(sort $(wildcard $(SRC_HOME)/common/local/util/
$(SRC_HOME)/core/cvfpu/src/fpu_div_sqrt_mvp/hdl/preprocess_mvp.sv \
$(SRC_HOME)/core/cvxif_example/include/cvxif_instr_pkg.sv \
$(sort $(wildcard $(SRC_HOME)/core/frontend/*.sv)) \
$(SRC_HOME)/vendor/pulp-platform/tech_cells_generic/src/rtl/tc_sram.sv \
$(PLATFORM_DIR)/verilog/fakeram7_64x256.sv \
$(PLATFORM_DIR)/verilog/fakeram7_128x64.sv \
$(PLATFORM_DIR)/verilog/fakeram7_64x28.sv \
$(PLATFORM_DIR)/verilog/fakeram7_64x25.sv
$(SRC_HOME)/vendor/pulp-platform/tech_cells_generic/src/rtl/tc_sram.sv

export VERILOG_INCLUDE_DIRS = $(DESIGN_HOME)/src/$(DESIGN_NICKNAME)/core/include \
$(DESIGN_HOME)/src/$(DESIGN_NICKNAME)/core/cvfpu/src/common_cells/include \
$(DESIGN_HOME)/src/$(DESIGN_NICKNAME)/core/cache_subsystem/hpdcache/rtl/include

export VERILOG_DEFINES += -D HPDCACHE_ASSERT_OFF

export ADDITIONAL_LEFS = $(PLATFORM_DIR)/lef/fakeram7_64x256.lef \
$(PLATFORM_DIR)/lef/fakeram7_128x64.lef \
$(PLATFORM_DIR)/lef/fakeram7_64x28.lef \
$(PLATFORM_DIR)/lef/fakeram7_64x25.lef
# The RAMs are upstream's, the RTL unmodified, and AUTO_MEMORIES makes
# each a macro, cva6.memories naming its pins and byte enables: the
# D-cache data (hpdcache_sram_wbyteenable_1rw) and directory
# (hpdcache_sram_1rw), and the I-cache data and tag, which surgery.py
# puts behind sram_cache's techno cut in place of pulp's tc_sram.
export SYNTH_VERILOG_SURGERY = $(DESIGN_HOME)/$(PLATFORM)/cva6/surgery.py
export AUTO_MEMORIES = 1
export ADDITIONAL_MEMORIES = $(DESIGN_HOME)/$(PLATFORM)/cva6/cva6.memories

export ADDITIONAL_LIBS = $(PLATFORM_DIR)/lib/NLDM/fakeram7_64x256.lib \
$(PLATFORM_DIR)/lib/NLDM/fakeram7_128x64.lib \
$(PLATFORM_DIR)/lib/NLDM/fakeram7_64x28.lib \
$(PLATFORM_DIR)/lib/NLDM/fakeram7_64x25.lib
# Kepler LEC off for now: kepler-formal stops on the macros AUTO_MEMORIES

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nanocoh I'm disabling this for now. Once kepler-formal is bumped in bazel bcr and #4732 is merged, we're in a great position to wire up cva6 properly to cva6.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok. lets do that.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some update. The issue was not with the tool but with missing memory files that were added with this change and need to be given to the formal check. Added the fix to #4329

# makes ("cva6_icache_data_sram cannot be found"). A new kepler-formal is
# in the works; the Kepler team rewires LEC for cva6 with it.
export LEC_CHECK = 0

export SDC_FILE = $(DESIGN_HOME)/$(PLATFORM)/$(DESIGN_NAME)/constraint.sdc

Expand Down
242 changes: 242 additions & 0 deletions flow/designs/asap7/cva6/cva6.memories
Original file line number Diff line number Diff line change
@@ -0,0 +1,242 @@
{
"version": 1,
"memories": [
{
"name": "cva6_icache_data_sram",
"rows": 64,
"bits": 256,
"addr_w": 6,
"rw_ports": 1,
"mask_lanes": 32,
"idiomatic": true,
"reason": "the I-cache data RAM behind the techno cut (surgery.py): one read-write port, byte enables",
"pins": [
{
"name": "clk",
"direction": "input",
"width": 1,
"port_id": "RW0",
"function": "clk"
},
{
"name": "cs",
"direction": "input",
"width": 1,
"port_id": "RW0",
"function": "en"
},
{
"name": "we",
"direction": "input",
"width": 1,
"port_id": "RW0",
"function": "wmode"
},
{
"name": "addr",
"direction": "input",
"width": 6,
"port_id": "RW0",
"function": "addr"
},
{
"name": "wdata",
"direction": "input",
"width": 256,
"port_id": "RW0",
"function": "data_in"
},
{
"name": "be",
"direction": "input",
"width": 32,
"port_id": "RW0",
"function": "mask"
},
{
"name": "rdata",
"direction": "output",
"width": 256,
"port_id": "RW0",
"function": "data_out"
}
]
},
{
"name": "cva6_icache_tag_sram",
"rows": 64,
"bits": 25,
"addr_w": 6,
"rw_ports": 1,
"mask_lanes": 4,
"mask_lane_width": 8,
"idiomatic": true,
"reason": "the I-cache tag RAM behind the techno cut (surgery.py): one read-write port, byte enables, the last 1 bit",
"pins": [
{
"name": "clk",
"direction": "input",
"width": 1,
"port_id": "RW0",
"function": "clk"
},
{
"name": "cs",
"direction": "input",
"width": 1,
"port_id": "RW0",
"function": "en"
},
{
"name": "we",
"direction": "input",
"width": 1,
"port_id": "RW0",
"function": "wmode"
},
{
"name": "addr",
"direction": "input",
"width": 6,
"port_id": "RW0",
"function": "addr"
},
{
"name": "wdata",
"direction": "input",
"width": 25,
"port_id": "RW0",
"function": "data_in"
},
{
"name": "be",
"direction": "input",
"width": 4,
"port_id": "RW0",
"function": "mask"
},
{
"name": "rdata",
"direction": "output",
"width": 25,
"port_id": "RW0",
"function": "data_out"
}
]
},
{
"name": "hpdcache_sram_1rw",
"rows": 64,
"bits": 28,
"addr_w": 6,
"rw_ports": 1,
"idiomatic": true,
"reason": "the D-cache directory RAM: one read-write port",
"pins": [
{
"name": "clk",
"direction": "input",
"width": 1,
"port_id": "RW0",
"function": "clk"
},
{
"name": "cs",
"direction": "input",
"width": 1,
"port_id": "RW0",
"function": "en"
},
{
"name": "we",
"direction": "input",
"width": 1,
"port_id": "RW0",
"function": "wmode"
},
{
"name": "addr",
"direction": "input",
"width": 6,
"port_id": "RW0",
"function": "addr"
},
{
"name": "wdata",
"direction": "input",
"width": 28,
"port_id": "RW0",
"function": "data_in"
},
{
"name": "rdata",
"direction": "output",
"width": 28,
"port_id": "RW0",
"function": "data_out"
}
]
},
{
"name": "hpdcache_sram_wbyteenable_1rw",
"rows": 128,
"bits": 64,
"addr_w": 7,
"rw_ports": 1,
"mask_lanes": 8,
"idiomatic": true,
"reason": "the D-cache data RAM, both ways of a set in a word: one read-write port, byte mask",
"pins": [
{
"name": "clk",
"direction": "input",
"width": 1,
"port_id": "RW0",
"function": "clk"
},
{
"name": "cs",
"direction": "input",
"width": 1,
"port_id": "RW0",
"function": "en"
},
{
"name": "we",
"direction": "input",
"width": 1,
"port_id": "RW0",
"function": "wmode"
},
{
"name": "addr",
"direction": "input",
"width": 7,
"port_id": "RW0",
"function": "addr"
},
{
"name": "wdata",
"direction": "input",
"width": 64,
"port_id": "RW0",
"function": "data_in"
},
{
"name": "wbyteenable",
"direction": "input",
"width": 8,
"port_id": "RW0",
"function": "mask"
},
{
"name": "rdata",
"direction": "output",
"width": 64,
"port_id": "RW0",
"function": "data_out"
}
]
}
]
}
Loading