Top Egret
Specification
The datasheet and specification of Egret is located here.
How to generate
The top module rtl/top_egret.sv is created by topgen.py.
To generate Egret, run either of these commands from the repo top:
make -C hw top_and_cmdgenutil/topgen.py -t hw/top_egret/data/top_egret.hjson -s hw/top_egret/data/top_egret_seed.testing.hjson -o hw/top_egret
It generates a number of files under $REPO_TOP/hw/top_egret, including:
rtl/autogen/top_egret.sv: Top module SV generated from the templatetemplates/toplevel.sv.tplwith the configuration filedata/top_egret.hjson.ip/xbar_main/rtl/autogen/xbar_main.svandip/xbar_main/rtl/autogen/tl_main_pkg.sv: Main crossbar module. Egret also has a peripheral crossbar (xbar_peri). The tlgen library is used to generate these files.ip_autogen/rv_plic/rtl/rv_plic*.svandip_autogen/rv_plic/data/rv_plic.hjson: Interrupt controller module.
Modifying the top configuration
The main configuration file for Top Egret is data/top_egret.hjson.
It specifies the list of peripherals/IP blocks, memories, crossbars, and interrupts for the top level design. For memories, it specifies the memory type, base address, and size.
IP blocks and crossbars have separate configuration files.
Modifying the template
Main top template file is data/top_egret.sv.tpl.
In most cases, modifying the template file isn’t required because altering the configuration file can make adequate changes.
There might still be some changes that warrant revising the template, such as editing the modules which are hard-coded in the template.