Skip to content

Commit

Permalink
Remove the SV plugin
Browse files Browse the repository at this point in the history
Signed-off-by: Krzysztof Bieganski <[email protected]>
  • Loading branch information
kbieganski committed Sep 6, 2023
1 parent 5471d10 commit a215770
Show file tree
Hide file tree
Showing 43 changed files with 17 additions and 11,783 deletions.
16 changes: 15 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
# TODO: pass as -D to gcc so that modules can provide e.g. --version flags.
PLUGIN_VERSION = 1.20230906

PLUGIN_LIST := fasm xdc params sdc ql-iob design_introspection integrateinv ql-qlf systemverilog uhdm dsp-ff
PLUGIN_LIST := fasm xdc params sdc ql-iob design_introspection integrateinv ql-qlf dsp-ff
PLUGINS := $(foreach plugin,$(PLUGIN_LIST),$(plugin).so)
PLUGINS_INSTALL := $(foreach plugin,$(PLUGIN_LIST),install_$(plugin))
PLUGINS_CLEAN := $(foreach plugin,$(PLUGIN_LIST),clean_$(plugin))
Expand Down Expand Up @@ -87,3 +87,17 @@ VERIBLE_FORMAT ?= verible-verilog-format
.PHONY: format-verilog
format-verilog:
find */tests \( -name "*.v" -o -name "*.sv" \) -and -not -path '*/third_party/*' -print0 | xargs -0 $(VERIBLE_FORMAT) --inplace

# Notify that the SystemVerilog plugin has been moved
.PHONY: systemverilog.so
systemverilog.so:
$(error The SystemVerilog plugin has been moved to https://github.com/chipsalliance/systemverilog-plugin.)

.PHONY: install_systemverilog
install_systemverilog: systemverilog.so

.PHONY: clean_systemverilog
clean_systemverilog: systemverilog.so

.PHONY: test_systemverilog
test_systemverilog: systemverilog.so
10 changes: 1 addition & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,15 +99,7 @@ The plugin adds the following commands:

## SystemVerilog plugin

Reads SystemVerilog and UHDM files and processes them into yosys AST.

The plugin adds the following commands:

* read_systemverilog
* read_uhdm

Detailed help on the supported command(s) can be obtained by running `help <command_name>` in Yosys.

The SystemVerilog plugin has been moved to [chipsalliance/systemverilog-plugin](https://github.com/chipsalliance/systemverilog-plugin).

## Clock Gating plugin

Expand Down
54 changes: 0 additions & 54 deletions systemverilog-plugin/Makefile

This file was deleted.

116 changes: 1 addition & 115 deletions systemverilog-plugin/README.md
Original file line number Diff line number Diff line change
@@ -1,117 +1,3 @@
# SystemVerilog Plugin

Reads SystemVerilog and UHDM files and processes them into Yosys AST.

The plugin adds the following commands:

* `read_systemverilog`
* `read_uhdm`

A more detailed help on the supported commands can be obtained by running `help <command_name>` in Yosys.

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.
This repository also runs dedicated CI pipelines that perform extensive testing of this plugin.

## Installation

A pre-built binary can be downloaded from the [release page](https://github.com/antmicro/yosys-uhdm-plugin-integration/releases).
The release archive contains an installation script that detects Yosys installation and installs the plugin.

To build from sources please refer to the [integration repository](https://github.com/antmicro/yosys-uhdm-plugin-integration).

## Usage

Usage of the plugin is very simple.

This paragraph describes the synthesis process given the following `counter.sv` file:

```
module top (
input clk,
output [3:0] led
);
localparam BITS = 4;
localparam LOG2DELAY = 22;
wire bufg;
BUFG bufgctrl (
.I(clk),
.O(bufg)
);
reg [BITS+LOG2DELAY-1:0] counter = 0;
always @(posedge bufg) begin
counter <= counter + 1;
end
assign led[3:0] = counter >> LOG2DELAY;
endmodule
```

To load the plugin, execute `plugin -i systemverilog`.
Then to load SystemVerilog sources, execute `read_systemverilog`.
The rest of the flow is exactly the same as without the plugin.

To synthesize the `counter.sv` file:

```
yosys> plugin -i systemverilog
yosys> read_systemverilog counter.v
1. Executing Verilog with UHDM frontend.
[INF:CM0023] Creating log file ./slpp_all/surelog.log.
[WRN:PA0205] counter.v:1: No timescale set for "top".
[INF:CP0300] Compilation...
[INF:CP0303] counter.v:1: Compile module "work@top".
(...)
Generating RTLIL representation for module `\top'.
yosys> synth_xilinx
2. Executing SYNTH_XILINX pass.
(...)
3.50. Printing statistics.
=== top ===
Number of wires: 10
Number of wire bits: 167
Number of public wires: 4
Number of public wire bits: 32
Number of memories: 0
Number of memory bits: 0
Number of processes: 0
Number of cells: 40
BUFG 1
CARRY4 7
FDRE 26
IBUF 1
INV 1
OBUF 4
Estimated number of LCs: 0
3.51. Executing CHECK pass (checking for obvious problems).
Checking module top...
Found and reported 0 problems.
yosys> write_edif counter.edif
4. Executing EDIF backend.
```
As a result we get a `counter.edif` file that can be further processed to get the bitstream.

### Parsing multiple files
When parsing multiple files you can either pass them together to the `read_systemverilog` command
or read them one by one using `-defer` flag. In the latter case, you will need to call
`readsystemverilog -link` after processing all files to elaborate them. An example flow would
look like below:
```
plugin -i systemverilog
# Read each file separately
read_systemverilog -defer dut.sv
read_systemverilog -defer top.sv
# Finish reading files, elaborate the design
read_systemverilog -link
# Continue Yosys flow...
```
The SystemVerilog plugin has been moved to [chipsalliance/systemverilog-plugin](https://github.com/chipsalliance/systemverilog-plugin).
Loading

0 comments on commit a215770

Please sign in to comment.