Skip to content

Commit

Permalink
Big refactoring + Improvements for future auto-generation script (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
fischeti authored Oct 4, 2023
1 parent cddb608 commit dc9ef7d
Show file tree
Hide file tree
Showing 38 changed files with 2,673 additions and 2,787 deletions.
8 changes: 4 additions & 4 deletions Bender.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,9 @@ export_include_dirs:

sources:
# Level 0
- src/floo_axi_flit_pkg.sv
- src/floo_narrow_wide_flit_pkg.sv
- src/floo_axi_pkg.sv
- src/floo_narrow_wide_pkg.sv
- src/floo_pkg.sv
- src/floo_param_pkg.sv
# Level 1
- src/floo_cut.sv
- src/floo_fifo.sv
Expand Down Expand Up @@ -64,9 +63,10 @@ sources:
- target: any(synthesis,spyglass)
files:
# Level 0
- test/floo_test_pkg.sv
# Level 1
- src/synth/floo_synth_axi_chimney.sv
- src/synth/floo_synth_narrow_wide_chimney.sv
- src/synth/floo_synth_router.sv
- src/synth/floo_synth_router_simple.sv
- src/synth/floo_synth_narrow_wide_router.sv
- src/synth/floo_synth_endpoint.sv
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,25 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Unreleased

### Changed

- Renamed `*_flit_pkg` to `*_pkg`
- New naming scheme of ports: All AXI ports are now prefixed with `axi_`, all FlooNoC links are now prefixed with `floo_`
- Renamed `floo_param_pkg` to `floo_test_pkg`
- Renamed AXI `resp_t` structs to `rsp_t`
- Changed configuration format to align with upcoming FlooNoC generation script

### Added

- Table based routing support in `narrow_wide_chimney`
- Support for different number of inputs and outputs in `narrow_wide_router`

### Fixed

- Test modules `floo_axi_rand_slave` & `floo_dma_test_node` now support `addr_width > 32`

## [0.1.0] - 2023-06-19

### Added
Expand Down
8 changes: 5 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -67,17 +67,19 @@ endif
###################

FLIT_CFG ?= $(shell find util -name "*.hjson")
FLIT_SRC ?= $(patsubst util/%_cfg.hjson,src/floo_%_flit_pkg.sv,$(FLIT_CFG))
FLIT_SRC ?= $(patsubst util/%_cfg.hjson,src/floo_%_pkg.sv,$(FLIT_CFG))
FLIT_GEN ?= util/flit_gen.py
FLIT_TPL ?= util/floo_flit_pkg.sv.mako

.PHONY: sources clean-sources

sources: $(FLIT_SRC)
src/floo_%_flit_pkg.sv: util/%_cfg.hjson
src/floo_%_pkg.sv: util/%_cfg.hjson $(FLIT_GEN) $(FLIT_TPL)
./util/flit_gen.py -c $< > $@
$(VERIBLE_FMT) --inplace --try_wrap_long_lines $@

clean-sources:
rm -f src/floo_*_flit_pkg.sv
rm -f src/floo_*_pkg.sv

######################
# Traffic Generation #
Expand Down
27 changes: 12 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,37 +146,34 @@ The data structs for the flits and the links are auto-generated and can be confi

The AXI channels(s) needs to be configured in `util/*cfg.hjson`. The following example shows the configuration for a single AXI channel with 64-bit data width, 32-bit address width, 3-bit ID width, and 1-bit user width (beware that ID width can be different for input and output channels).

```
```
axi_channels: [
{name: 'axi', params: {dw: 64, aw: 32, iw: 3, uw: 1 }},
{name: 'axi', direction: 'input', params: {dw: 64, aw: 32, iw: 3, uw: 1 }},
]
```
Multiple physical links can be declared and the mapping of the AXI channels to the physical link can be configured in `util/*cfg.json`. The following example shows the configuration for two physical channels, one for requests and one for responses. The mapping of the AXI channels to the physical link is done by specifying the AXI channels in the `map` field.

```
phys_channels: [
'req',
'rsp'
],
map: {
req: ["axi_aw", "axi_w", "axi_ar"],
rsp: ["axi_b", "axi_r"]
channel_mapping: {
req: {axi: ['aw', 'w', 'ar']},
rsp: {axi: ['b', 'r']}
},
```

FlooNoC does not send any header and tail flits to avoid serilization overhead. Instead additional needed information is sent in parallel and can be specified with the `meta` argument and the number of bits required. For instance, the `rob_req` field specifies if a responses needs to be reorderd. The `rob_idx` field specifies the index of the ROB that is used to track the outstanding requests. The `dst_id` & `src_id` fields specifies source and destination to route the packet. The `last` field specifies the last signal of the of a burst transfer used in wormhole routing.
FlooNoC does not send any header and tail flits to avoid serilization overhead. Instead additional needed information is sent in parallel and can be specified with the `header` argument and the number of bits required. For instance, the `rob_req` field specifies if a responses needs to be reorderd. The `rob_idx` field specifies the index of the ROB that is used to track the outstanding requests. The `dst_id` & `src_id` fields specifies source and destination to route the packet. The `last` field specifies the last signal of the of a burst transfer used in wormhole routing.

```
meta: {
header: {
rob_req: 1,
rob_idx: 7,
rob_idx: 6,
dst_id: 6,
src_id: 6,
last: 1
last: 1,
atop: 1,
}
```
Finally, the package source files can be generated with the following command:
Finally, the package source files can be generated with:

```sh
python util/flit_gen.py -c /path/to/cfg.hjson -o /path/to/outdir
make sources
```
Loading

0 comments on commit dc9ef7d

Please sign in to comment.