Skip to content

Commit 7c89a55

Browse files
authored
Merge pull request #546 from chipsalliance/remove-sv-plugin
Remove the SystemVerilog plugin
2 parents 9be2ac0 + 129ba80 commit 7c89a55

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+23
-11792
lines changed

.github/workflows/build-and-test.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@ fi
2828

2929
start_section Building
3030

31-
if [ "$PLUGIN_NAME" == "xdc" ] || [ "$PLUGIN_NAME" == "sdc" ]; then
31+
if [ "$PLUGIN_NAME" == "xdc" ] || [ "$PLUGIN_NAME" == "sdc" ]; then
3232
make design_introspection.so -j`nproc`
3333
make install_design_introspection -j`nproc`
34-
fi
34+
fi
3535

3636
export CXXFLAGS=-Werror
37-
make UHDM_INSTALL_DIR=`pwd`/env/conda/envs/yosys-plugins/ ${PLUGIN_NAME}.so -j`nproc`
37+
make ${PLUGIN_NAME}.so -j`nproc`
3838
unset CXXFLAGS
3939

4040
end_section

.github/workflows/ci.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,6 @@ jobs:
3535
- design_introspection
3636
- integrateinv
3737
- ql-qlf
38-
- systemverilog
39-
- uhdm
4038
- dsp-ff
4139

4240
steps:

.github/workflows/setup.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ end_section
4747
#Install yosys
4848
start_section Install-Yosys
4949
(
50-
echo '================================='
51-
echo 'Making env with Yosys and Surelog'
52-
echo '================================='
50+
echo '====================='
51+
echo 'Making env with Yosys'
52+
echo '====================='
5353
make env
5454
source env/conda/bin/activate yosys-plugins
5555
conda list

Makefile

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
# TODO: pass as -D to gcc so that modules can provide e.g. --version flags.
2525
PLUGIN_VERSION = 1.20230906
2626

27-
PLUGIN_LIST := fasm xdc params sdc ql-iob design_introspection integrateinv ql-qlf systemverilog uhdm dsp-ff
27+
PLUGIN_LIST := fasm xdc params sdc ql-iob design_introspection integrateinv ql-qlf dsp-ff
2828
PLUGINS := $(foreach plugin,$(PLUGIN_LIST),$(plugin).so)
2929
PLUGINS_INSTALL := $(foreach plugin,$(PLUGIN_LIST),install_$(plugin))
3030
PLUGINS_CLEAN := $(foreach plugin,$(PLUGIN_LIST),clean_$(plugin))
@@ -87,3 +87,17 @@ VERIBLE_FORMAT ?= verible-verilog-format
8787
.PHONY: format-verilog
8888
format-verilog:
8989
find */tests \( -name "*.v" -o -name "*.sv" \) -and -not -path '*/third_party/*' -print0 | xargs -0 $(VERIBLE_FORMAT) --inplace
90+
91+
# Notify that the SystemVerilog plugin has been moved
92+
.PHONY: systemverilog.so
93+
systemverilog.so:
94+
$(error The SystemVerilog plugin has been moved to https://github.com/chipsalliance/systemverilog-plugin.)
95+
96+
.PHONY: install_systemverilog
97+
install_systemverilog: systemverilog.so
98+
99+
.PHONY: clean_systemverilog
100+
clean_systemverilog: systemverilog.so
101+
102+
.PHONY: test_systemverilog
103+
test_systemverilog: systemverilog.so

README.md

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -99,15 +99,7 @@ The plugin adds the following commands:
9999

100100
## SystemVerilog plugin
101101

102-
Reads SystemVerilog and UHDM files and processes them into yosys AST.
103-
104-
The plugin adds the following commands:
105-
106-
* read_systemverilog
107-
* read_uhdm
108-
109-
Detailed help on the supported command(s) can be obtained by running `help <command_name>` in Yosys.
110-
102+
The SystemVerilog plugin has been moved to [chipsalliance/systemverilog-plugin](https://github.com/chipsalliance/systemverilog-plugin).
111103

112104
## Clock Gating plugin
113105

environment.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,4 @@ channels:
2020
- litex-hub
2121
dependencies:
2222
- litex-hub::yosys=0.17_7_g990c9b8e1=20220512_085338_py37
23-
- litex-hub::surelog
2423
- litex-hub::iverilog

systemverilog-plugin/Makefile

Lines changed: 0 additions & 54 deletions
This file was deleted.

systemverilog-plugin/README.md

Lines changed: 1 addition & 115 deletions
Original file line numberDiff line numberDiff line change
@@ -1,117 +1,3 @@
11
# SystemVerilog Plugin
22

3-
Reads SystemVerilog and UHDM files and processes them into Yosys AST.
4-
5-
The plugin adds the following commands:
6-
7-
* `read_systemverilog`
8-
* `read_uhdm`
9-
10-
A more detailed help on the supported commands can be obtained by running `help <command_name>` in Yosys.
11-
12-
Please see the dedicated [integration repository](https://github.com/antmicro/yosys-uhdm-plugin-integration) which contains more information about installation and usage of this plugin.
13-
This repository also runs dedicated CI pipelines that perform extensive testing of this plugin.
14-
15-
## Installation
16-
17-
A pre-built binary can be downloaded from the [release page](https://github.com/antmicro/yosys-uhdm-plugin-integration/releases).
18-
The release archive contains an installation script that detects Yosys installation and installs the plugin.
19-
20-
To build from sources please refer to the [integration repository](https://github.com/antmicro/yosys-uhdm-plugin-integration).
21-
22-
## Usage
23-
24-
Usage of the plugin is very simple.
25-
26-
This paragraph describes the synthesis process given the following `counter.sv` file:
27-
28-
```
29-
module top (
30-
input clk,
31-
output [3:0] led
32-
);
33-
localparam BITS = 4;
34-
localparam LOG2DELAY = 22;
35-
36-
wire bufg;
37-
BUFG bufgctrl (
38-
.I(clk),
39-
.O(bufg)
40-
);
41-
reg [BITS+LOG2DELAY-1:0] counter = 0;
42-
always @(posedge bufg) begin
43-
counter <= counter + 1;
44-
end
45-
assign led[3:0] = counter >> LOG2DELAY;
46-
endmodule
47-
```
48-
49-
To load the plugin, execute `plugin -i systemverilog`.
50-
Then to load SystemVerilog sources, execute `read_systemverilog`.
51-
The rest of the flow is exactly the same as without the plugin.
52-
53-
To synthesize the `counter.sv` file:
54-
55-
```
56-
yosys> plugin -i systemverilog
57-
yosys> read_systemverilog counter.v
58-
1. Executing Verilog with UHDM frontend.
59-
[INF:CM0023] Creating log file ./slpp_all/surelog.log.
60-
[WRN:PA0205] counter.v:1: No timescale set for "top".
61-
[INF:CP0300] Compilation...
62-
[INF:CP0303] counter.v:1: Compile module "work@top".
63-
(...)
64-
Generating RTLIL representation for module `\top'.
65-
66-
yosys> synth_xilinx
67-
68-
2. Executing SYNTH_XILINX pass.
69-
70-
(...)
71-
72-
3.50. Printing statistics.
73-
74-
=== top ===
75-
76-
Number of wires: 10
77-
Number of wire bits: 167
78-
Number of public wires: 4
79-
Number of public wire bits: 32
80-
Number of memories: 0
81-
Number of memory bits: 0
82-
Number of processes: 0
83-
Number of cells: 40
84-
BUFG 1
85-
CARRY4 7
86-
FDRE 26
87-
IBUF 1
88-
INV 1
89-
OBUF 4
90-
91-
Estimated number of LCs: 0
92-
93-
3.51. Executing CHECK pass (checking for obvious problems).
94-
Checking module top...
95-
Found and reported 0 problems.
96-
97-
yosys> write_edif counter.edif
98-
99-
4. Executing EDIF backend.
100-
101-
```
102-
As a result we get a `counter.edif` file that can be further processed to get the bitstream.
103-
104-
### Parsing multiple files
105-
When parsing multiple files you can either pass them together to the `read_systemverilog` command
106-
or read them one by one using `-defer` flag. In the latter case, you will need to call
107-
`readsystemverilog -link` after processing all files to elaborate them. An example flow would
108-
look like below:
109-
```
110-
plugin -i systemverilog
111-
# Read each file separately
112-
read_systemverilog -defer dut.sv
113-
read_systemverilog -defer top.sv
114-
# Finish reading files, elaborate the design
115-
read_systemverilog -link
116-
# Continue Yosys flow...
117-
```
3+
The SystemVerilog plugin has been moved to [chipsalliance/systemverilog-plugin](https://github.com/chipsalliance/systemverilog-plugin).

0 commit comments

Comments
 (0)