Skip to content

Commit

Permalink
Repackage builtin cores and interfaces into a user repo
Browse files Browse the repository at this point in the history
  • Loading branch information
mszalkowski-ant committed Dec 17, 2024
1 parent b52e846 commit 30de971
Show file tree
Hide file tree
Showing 68 changed files with 1,395 additions and 2,022 deletions.
17 changes: 7 additions & 10 deletions docs/source/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,18 +45,16 @@ The configuration file for Topwrap provides the following options:

- `repositories`

- Type: List of objects
- Type: Dictionary of `name: path`
- Merging strategy: Merge
- Specifies repositories to load, with each repository defined as an object containing the following fields:
- `name`: (required) The name of the repository.
- `path`: (required) The file system path to the repository.
- Specifies repositories to load, with each repository defined as an entry in which:
- The key is the name of the repository.
- The value is the [resource path](description_files.md#resource-path-syntax) to the repository.
- Example of specifying multiple repositories:
```yaml
repositories:
- name: name_of_repo
path: path_to_repo
- name: another_repo
path: /absolute/path/to/repo
name_of_repo: file:path_to_repo
another_repo: file:/absolute/path/to/repo
```
Repositories are used to package and load multiple IP cores and custom interfaces.
Expand All @@ -70,6 +68,5 @@ Here is a sample configuration file used in the [hierarchy example](examples.md#
```yaml
force_interface_compliance: true
repositories:
- name: Hierarchies example
path: ./repo/
my_repo: file:./repo
```
4 changes: 2 additions & 2 deletions examples/constant/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ generate: copy_sources
topwrap build --design ${DESIGN} --sources ${SOURCE_DIR}

$(JSONS):
topwrap specification ipcores/*
topwrap dataflow -d project.yaml ipcores/*
topwrap specification -d project.yaml
topwrap dataflow -d project.yaml

# -------------------------------------
# Utilities
Expand Down
2 changes: 1 addition & 1 deletion examples/constant/project.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

ips:
ip_ibuf:
file: ipcores/ibuf.yaml
file: file:ipcores/ibuf.yaml

design:
name: project_top
Expand Down
2 changes: 1 addition & 1 deletion examples/getting_started_demo/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ SOURCE_FILES := \
all: $(JSONS)

$(JSONS): parse
topwrap specification ${IPCORES_DIR}/*.yaml
topwrap specification -d project.yaml
topwrap dataflow -d project.yaml ${IPCORES_DIR}/*.yaml

parse: clean setup
Expand Down
4 changes: 2 additions & 2 deletions examples/getting_started_demo/project.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ external:
- Output_c
ips:
simple_core_1:
file: ipcores/simple_core_1.yaml
file: file:ipcores/simple_core_1.yaml
simple_core_2:
file: ipcores/simple_core_2.yaml
file: file:ipcores/simple_core_2.yaml
4 changes: 2 additions & 2 deletions examples/hdmi/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ deps:
ci: deps generate

$(JSONS):
topwrap specification ipcores/*.yaml ../../topwrap/ips/axi/*.yaml
topwrap dataflow -d project.yaml ipcores/*.yaml ../../topwrap/ips/axi/*.yaml
topwrap specification -d project.yaml
topwrap dataflow -d project.yaml

.PHONY: clean copy_sources fusesoc_init generate copy_sources snickerdoodle zvb deps ci all
30 changes: 15 additions & 15 deletions examples/hdmi/project.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -188,32 +188,32 @@ external:
- HDMI_D2_N
ips:
axi_bridge_disp:
file: axi/axi_axil_adapter.yaml
file: &axil repo[builtin]:cores/axi_axil_adapter/core.yaml
axi_bridge_dma:
file: axi/axi_axil_adapter.yaml
file: *axil
axi_bridge_mmcm:
file: axi/axi_axil_adapter.yaml
file: *axil
axi_interconnect0:
file: axi/axi_interconnect.yaml
file: repo[builtin]:cores/axi_interconnect/core.yaml
axi_protocol_converter0:
file: axi/axi_protocol_converter.yaml
file: repo[builtin]:cores/axi_protocol_converter/core.yaml
axis_clock_converter:
file: axi/axis_async_fifo.yaml
file: repo[builtin]:cores/axis_async_fifo/core.yaml
axis_dwidth_converter:
file: axi/axis_dwidth_converter.yaml
file: repo[builtin]:cores/axis_dwidth_converter/core.yaml
clock_crossing:
file: ipcores/clock_crossing.yaml
file: file:ipcores/clock_crossing.yaml
disp:
file: ipcores/axi_dispctrl.yaml
file: file:ipcores/axi_dispctrl.yaml
dma:
file: ipcores/dma_axi_in_axis_out.yaml
file: file:ipcores/dma_axi_in_axis_out.yaml
hdmi:
file: ipcores/hdmi_tx.yaml
file: file:ipcores/hdmi_tx.yaml
mmcm:
file: ipcores/litex_mmcm.yaml
file: file:ipcores/litex_mmcm.yaml
ps7:
file: ipcores/ps7.yaml
file: file:ipcores/ps7.yaml
reset0:
file: ipcores/proc_sys_reset.yaml
file: file:ipcores/proc_sys_reset.yaml
reset1:
file: ipcores/proc_sys_reset.yaml
file: file:ipcores/proc_sys_reset.yaml
2 changes: 1 addition & 1 deletion examples/hierarchy/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ JSONS = kpm_spec.json kpm_dataflow.json
all: $(JSONS)

$(JSONS):
topwrap specification
topwrap specification -d project.yaml
topwrap dataflow -d project.yaml

clean:
Expand Down
16 changes: 8 additions & 8 deletions examples/hierarchy/project.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ design:
- cs_s1_empty_out
ips:
s1_mod_1:
file: repo/cores/s1_mod_1/s1_mod_1.yaml
file: file:repo/cores/s1_mod_1/s1_mod_1.yaml
s1_mod_2:
file: repo/cores/s1_mod_2/s1_mod_2.yaml
file: file:repo/cores/s1_mod_2/s1_mod_2.yaml
s1_mod_3:
file: repo/cores/s1_mod_3/s1_mod_3.yaml
file: file:repo/cores/s1_mod_3/s1_mod_3.yaml
sub_2:
design:
ports:
Expand All @@ -54,9 +54,9 @@ design:
- cs_s2_mod_out_1
ips:
s2_mod_1:
file: repo/cores/s2_mod_1/s2_mod_1.yaml
file: file:repo/cores/s2_mod_1/s2_mod_1.yaml
s2_mod_2:
file: repo/cores/s2_mod_2/s2_mod_2.yaml
file: file:repo/cores/s2_mod_2/s2_mod_2.yaml
ports:
sub_1:
cs_s1_int_const_in: 1
Expand Down Expand Up @@ -96,11 +96,11 @@ design:
- c_out_1
ips:
c_mod_1:
file: repo/cores/c_mod_1/c_mod_1.yaml
file: file:repo/cores/c_mod_1/c_mod_1.yaml
c_mod_2:
file: repo/cores/c_mod_2/c_mod_2.yaml
file: file:repo/cores/c_mod_2/c_mod_2.yaml
c_mod_3:
file: repo/cores/c_mod_3/c_mod_3.yaml
file: file:repo/cores/c_mod_3/c_mod_3.yaml
ports:
complex_sub:
cs_in_1: [counter, c_out_1]
Expand Down
3 changes: 1 addition & 2 deletions examples/hierarchy/topwrap.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
force_interface_compliance: false
repositories:
- name: Hierarchies example
path: ./repo/
my_repo: file:./repo/
4 changes: 2 additions & 2 deletions examples/inout/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ deps:
ci: deps generate

$(JSONS): parse
topwrap specification ${IPCORES_DIR}/*.yaml
topwrap dataflow -d project.yaml ${IPCORES_DIR}/*.yaml
topwrap specification -d project.yaml
topwrap dataflow -d project.yaml

.PHONY: setup clean fusesoc_init generate copy_sources bit parse deps ci all
6 changes: 3 additions & 3 deletions examples/inout/project.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@

ips:
ip_ibuf:
file: ipcores/ibuf.yaml
file: file:ipcores/ibuf.yaml
ip_obuf:
file: ipcores/obuf.yaml
file: file:ipcores/obuf.yaml
ip_iobuf:
file: ipcores/iobuf.yaml
file: file:ipcores/iobuf.yaml

design:
name: project_top
Expand Down
4 changes: 2 additions & 2 deletions examples/ir_examples/hierarchical/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ JSONS = kpm_spec.json kpm_dataflow.json
all: $(JSONS)

$(JSONS):
topwrap specification ips/*.yaml
topwrap dataflow -d design.yaml ips/*.yaml
topwrap specification
topwrap dataflow -d design.yaml

clean:
rm -f $(JSONS)
6 changes: 3 additions & 3 deletions examples/ir_examples/hierarchical/design.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ design:
- sum
ips:
D-flipflop:
file: ips/d_ff.yaml
file: file:ips/d_ff.yaml
adder:
file: ips/adder.yaml
file: file:ips/adder.yaml
encoder:
external:
ports:
Expand Down Expand Up @@ -77,7 +77,7 @@ design:
- enc2
ips:
debouncer:
file: ips/debouncer.yaml
file: file:ips/debouncer.yaml
ports:
proc:
btn: btn
Expand Down
4 changes: 2 additions & 2 deletions examples/ir_examples/interconnect/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ JSONS = kpm_spec.json kpm_dataflow.json
all: $(JSONS)

$(JSONS):
topwrap specification ips/*.yaml
topwrap dataflow -d design.yaml ips/*.yaml
topwrap specification
topwrap dataflow -d design.yaml

clean:
rm -f $(JSONS)
8 changes: 4 additions & 4 deletions examples/ir_examples/interconnect/design.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ external:

ips:
cpu:
file: ips/cpu.yaml
file: file:ips/cpu.yaml
wb_pass:
file: ips/wb_passthrough.yaml
file: file:ips/wb_passthrough.yaml
mem:
file: ips/mem.yaml
file: file:ips/mem.yaml
dsp:
file: ips/dsp.yaml
file: file:ips/dsp.yaml

design:
ports:
Expand Down
4 changes: 2 additions & 2 deletions examples/ir_examples/interface/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ JSONS = kpm_spec.json kpm_dataflow.json
all: $(JSONS)

$(JSONS):
topwrap specification ips/*.yaml
topwrap dataflow -d design.yaml ips/*.yaml
topwrap specification
topwrap dataflow -d design.yaml

clean:
rm -f $(JSONS)
4 changes: 2 additions & 2 deletions examples/ir_examples/interface/design.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ external:

ips:
streamer:
file: ips/streamer.yaml
file: file:ips/streamer.yaml
receiver:
file: ips/receiver.yaml
file: file:ips/receiver.yaml
4 changes: 2 additions & 2 deletions examples/ir_examples/simple/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ JSONS = kpm_spec.json kpm_dataflow.json
all: $(JSONS)

$(JSONS):
topwrap specification ips/*.yaml
topwrap dataflow -d design.yaml ips/*.yaml
topwrap specification
topwrap dataflow -d design.yaml

clean:
rm -f $(JSONS)
6 changes: 3 additions & 3 deletions examples/ir_examples/simple/design.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ external:

ips:
2mux:
file: ips/2mux.yaml
file: file:ips/2mux.yaml
gen1:
file: ips/lfsr_gen.yaml
file: file:ips/lfsr_gen.yaml
gen2:
file: ips/lfsr_gen.yaml
file: file:ips/lfsr_gen.yaml

design:
parameters:
Expand Down
4 changes: 2 additions & 2 deletions examples/pwm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ deps:
ci: deps generate

$(JSONS):
topwrap specification ipcores/*.yaml ../../topwrap/ips/axi/*.yaml
topwrap dataflow -d project.yaml ipcores/*.yaml ../../topwrap/ips/axi/*.yaml
topwrap specification -d project.yaml
topwrap dataflow -d project.yaml

.PHONY: clean copy_sources fusesoc_init generate zvb deps ci all
6 changes: 3 additions & 3 deletions examples/pwm/project.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ external:
- pwm
ips:
axi_bridge:
file: axi/axi_axil_adapter.yaml
file: repo[builtin]:cores/axi_axil_adapter/core.yaml
litex_pwm_top:
file: ipcores/litex_pwm.yaml
file: file:ipcores/litex_pwm.yaml
ps7:
file: ipcores/ps7.yaml
file: file:ipcores/ps7.yaml
4 changes: 2 additions & 2 deletions examples/soc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ build/simple_soc.bit: build/bios.init simple_soc.tcl $(IPCORE_SOURCES) build/sim
vivado -mode batch -source simple_soc.tcl

$(JSONS): $(IPCORE_YAMLS)
topwrap specification $(IPCORE_YAMLS)
topwrap dataflow -d project.yaml $(IPCORE_YAMLS)
topwrap specification -d project.yaml
topwrap dataflow -d project.yaml


generate: build/simple_soc.v
Expand Down
12 changes: 6 additions & 6 deletions examples/soc/project.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@

ips:
vexriscv:
file: ipcores/VexRiscv.yaml
file: file:ipcores/VexRiscv.yaml
wb_ram_data:
file: ipcores/mem.yaml
file: file:ipcores/mem.yaml
wb_ram_instr:
file: ipcores/mem.yaml
file: file:ipcores/mem.yaml
crg:
file: ipcores/crg.yaml
file: file:ipcores/crg.yaml
wb_uart:
file: ipcores/wb_uart.yaml
file: file:ipcores/wb_uart.yaml
interconnect:
file: ipcores/wb_interconnect.yaml
file: file:ipcores/wb_interconnect.yaml

design:
name: simple_soc
Expand Down
2 changes: 1 addition & 1 deletion examples/user_repository/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ JSONS = kpm_spec.json kpm_dataflow.json
all: $(JSONS)

$(JSONS):
topwrap specification
topwrap specification -d project.yaml
topwrap dataflow -d project.yaml

clean:
Expand Down
4 changes: 2 additions & 2 deletions examples/user_repository/project.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ external:
- ex_out_1
ips:
core1:
file: repo/cores/example_core1/core1.yaml
file: repo[my_repo]:cores/example_core1/core1.yaml
core2:
file: repo/cores/example_core2/core2.yaml
file: repo[my_repo]:cores/example_core2/core2.yaml
3 changes: 1 addition & 2 deletions examples/user_repository/topwrap.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
force_interface_compliance: false
repositories:
- name: Test loading config
path: ./repo/
my_repo: file:./repo/
Loading

0 comments on commit 30de971

Please sign in to comment.