Skip to content

Commit 8bd9287

Browse files
committed
structural changes as requested in review
1 parent 83be0bf commit 8bd9287

7 files changed

Lines changed: 28 additions & 9 deletions

File tree

CMakeLists.txt

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,17 +55,13 @@ option(ODIN_TIDY "Enable building odin with clang tidy" OFF)
5555
option(ODIN_SANITIZE "Enable building odin with sanitize flags" OFF)
5656

5757
# Yosys plugins. Yosys is built when WITH_PARMYS or WITH_MOSAIC is on.
58-
# At least one of those options must be on (not enforced on Windows).
5958
option(WITH_PARMYS "Enable Yosys as elaborator and parmys-plugin as partial mapper" ON)
6059
option(WITH_MOSAIC "Enable mosaic yosys plugin as an alternative synthesis frontend" ON)
6160
option(SLANG_SYSTEMVERILOG "Enable building and installing Yosys-Slang plugin for parsing SystemVerilog" ON)
6261

63-
if(NOT ${WITH_PARMYS} AND NOT ${WITH_MOSAIC})
64-
if(WIN32)
65-
message(STATUS "Neither parmys nor mosaic enabled (windows yosys plugins are disabled)")
66-
else()
67-
message(FATAL_ERROR "At least one of WITH_PARMYS or WITH_MOSAIC must be ON")
68-
endif()
62+
if(NOT ${WITH_PARMYS} AND NOT ${WITH_MOSAIC} AND NOT ${WITH_ODIN})
63+
message(FATAL_ERROR "At least one synthesis frontend must be enabled "
64+
"(WITH_PARMYS, WITH_MOSAIC, or WITH_ODIN)")
6965
endif()
7066

7167
if(${WITH_PARMYS} OR ${WITH_MOSAIC})

dev/pylint_check.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
paths_to_lint = [
2424
(repo_path, False),
2525
(repo_path / "dev", True),
26+
(repo_path / "mosaic", True),
2627
(repo_path / "odin_ii", True),
2728
(repo_path / "ace2", True),
2829
(repo_path / "doc", True),

mosaic/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
cmake_minimum_required(VERSION 3.16)
2+
13
# mosaic yosys plugin, built as part of the vtr tree.
24

35
project("mosaic")

mosaic/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ make -j$(nproc)
1414

1515
The plugin is at `build/share/yosys/plugins/mosaic.so`. Yosys loads it with `plugin -i mosaic`.
1616

17-
`WITH_MOSAIC` (default ON) and `WITH_PARMYS` (default ON) select the Yosys plugins. Yosys is built when either is on. At least one must be on.
17+
`WITH_MOSAIC` (default ON) and `WITH_PARMYS` (default ON) select the Yosys plugins. Yosys is built when either is on. At least one synthesis frontend (`WITH_PARMYS`, `WITH_MOSAIC`, or `WITH_ODIN`) must be enabled. To build VTR without Mosaic:
1818

1919
```shell
2020
make CMAKE_PARAMS="-DWITH_MOSAIC=OFF" -j$(nproc)

mosaic/wildebeest/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
cmake_minimum_required(VERSION 3.16)
2+
13
# wildebeest sources compiled into the mosaic plugin
24
add_library(wildebeest OBJECT
35
src/clk_domains.cc

vtr_flow/misc/mosaic/README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Mosaic Synthesis Configuration
2+
This directory contains the synthesis configuration files used by the Mosaic frontend.
3+
4+
5+
6+
## Layout
7+
- `template/`: shared synthesis driver and rule templates used by every architecture.
8+
- `rules/`: shared Verilog/template files for techmapping (BRAM, multiply, adder, hardblock stubs).
9+
- `abc/`: ABC delay scripts used during in-Yosys LUT mapping.
10+
- `lut_models/`: LUT Verilog models for `max_level`.
11+
- `synthesis.tcl`: main Yosys script copied into each run directory.
12+
- `fix_blif_for_vpr.py`: post-synthesis BLIF cleanup (ram addr pads, hierarchical net dots, latch-Q uniquify).
13+
- `<arch_xml_stem>/`: optional per-architecture policy directories. Each contains:
14+
- `arch_config.tcl`: architecture-specific knobs (hardblock aliases, soft/hard thresholds, costs, ABC script overrides).
15+
- `rules/` (optional): rule template overlays that replace the corresponding shared template file for that architecture.
16+
17+
Per-architecture directories are matched by the stem of the architecture XML filename passed to `run_vtr_flow.py`. When no matching directory exists, synthesis runs using defaults from `template/synthesis.tcl`.
18+
19+
See `mosaic/README.md` at the repository root for full technical details.

vtr_flow/tasks/regression_tests/vtr_reg_basic_mosaic/k6/config/config.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,3 @@ pass_requirements_file=pass_requirements.txt
2828
# Script parameters
2929
script_params_common = -track_memory_usage -start mosaic -verilator_check -verilator_check_vectors 20000
3030
script_params_list_add =
31-
script_params_list_add = --reorder_rr_graph_nodes_algorithm random_shuffle

0 commit comments

Comments
 (0)